Tag Archives: Java

Java

Sharing artifacts using the MDS Repository

Both during development and maintenance of code, deployment strategies relying on copying of artifacts will fail, or at least complicate the task at hand and frustrate reuse. SOA Suite offers a centralized storage for artifacts (like WSDL, XSD, and XSL files) that can be accessed both at design time and at run-time. It is called the MDS Repository, and comes with Metadata Services on top of it. It is part of the SOA Suite and doesn’t require additional installation. This blogpost will show you how to upload an artifact to the central MDS Repository, and how to use the uploaded artifact in your source code.

Locate and copy the WSDL

Locate the WSDL file in your project on the local file system, for example: C:\JDeveloper\mywork\AIApocBOUW\CreateInventoryTransactionRIBRMSProvABCSImpl.wsdl. In which a convention like C:\JDeveloper\mywork\__Workspace__\__project__ is used. You can also determine this path in JDeveloper by selecting the WSDL file and use CRTL-SHIFT-C (or by selecting contextmenu – Copy Path).

Use an FTP tool to move the file to the server running the SOA Suite. The path to use on the server depends on the application, version and component type. Typically in AIA there is a structure like $AIA_HOME/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/__Application__/__version__/__componentType__ . Where in AIA component types are ABCS Provider, ABCS Requestor, EBS, et cetera. In other environments you can create your own structure. Since you no longer need a local copy of the WSDL, remove it from your local file system.

Load the WSDL in the MDS Repository

To load the WSDL and other artifacts to the MDS repository there is an ANT script available on the server. To use ANT, make sure the needed environment settings are made correctly. When you installed AIA there is a Shell script available the will source both AIA and ANT environments: aiaenv.sh. This script can be found in ...../weblogic/aia30/aia_instances/aia30poc/bin. It can be convenient to copy this to your home directory.

  • Source AIA and ANT environment: source ./aiaenv.sh.
  • Alter the UpdateMetaDataDP.xml configuration file. It can be found in ...../weblogic/aia30/aia_instances/aia30poc/config.

In case your vi isn’t up to par use a tool like WinSCP and choose Edit in the context menu:

In the UpdateMetaDataDP.xml file alter the file set. In the example on which the screenshot is based
AIAComponents/ApplicationConnectorServiceLibrary/Retail/V1/RequesterABCS/CreateStockChangeLOCUSReqABCSImpl.wsdl
is added.

And now you are ready to run ANT using the actual loading script:
ant –f /fs01/app/oracle/esbtst01/weblogic/aia30/Infrastructure/Install/scripts/UpdateMetaData.xml


Check the output of the ANT script:

  • check that the correct number of files has been copied.
  • the server gave a HTTP response 200.
  • The deployment of the composite was successful.

Another check to verify a correct load into the MDS Repository is to use the MDS Browser in JDeveloper to find the file you just uploaded. A refresh of the view could be needed to include the latest changes and additions.

Using the WSDL in the MDS Repository in your source code

The last step is to reference to the WSDL in the MDS Repository, since the file has been removed from the local file system. Double click the Exposed Service to open the wizard:

Choose Existing WSDL to select the WSDL from the MDS Repository:

Check the change using the source view. In the import of the WSDL in the composite.xml there should now be an URL referring to oramds:, like in the example below:

<import namespace="http://xmlns.oracle.com/ABCSImpl/LOCUS/Core/CreateStockChangeLOCUSReqABCSImpl/V1"
        location="oramds:/apps/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/Locus/V1/RequesterABCS/CreateStockChangeLOCUSReqABCSImpl.wsdl"
        importType="wsdl"/>

Recently released Developer resources

This blog will point you to two valuable but free resources:

Designing the Service Contract

You can download a free PDF on Designing the Service Contract (alternative link). This is a sample chapter from the book Oracle SOA Suite Developer’s Guide. The book is available form here.
There are also two OTN Arch2Arch Podcast interviews with Oracle SOA Suite Developer’s Guide authors Matt Wright and Antony Reynolds now available:

Developing a Portlet using ADF

There is a free sample chapter on how to create Portlets using ADF available (alternative link). The chapter is taken from Web 2.0 solutions with Oracle WebCenter 11g. The book is available here.

In this chapter, you will learn the following:

  • JSF specification concepts
  • The types of portlets you can build with WebCenter
  • Developing a portlet using ADF
  • Integrating portlets with custom Applications

A pre-JavaOne peek into the future of Java

In this week just before JavaOne and Oracle OpenWorld the topic “the future of Java” keeps coming up again and again. Today the tweets coming out of the Oracle ACE Director briefing, that some how aren’t affected by a non-disclosure agreement, seem strong and positive: Ranging from Extremely passionate and very impressive, and incredibly passionate address to amazingly open words. Resulting in the statement Oracle is on the good side of the force… as far as Java is concerned. As close as we mere mortals can get at this point in time…

In one of the tweets Thomas Kurian is quoted:

After my keynote, there is no longer any confusion about the Java feature roadmap.

To see for yourself what the future of Java looks like, watch Thomas Kurian’s keynote live via the stream on JavaOne and Java Develop. To be continued…

Note that the Java Champions have joined the Oracle ACE Directors. As was stated here this significantly raised the number of Eclipse users 😉

Configuring SOA Infrastructure for SOAP optimization

SOA Infrastructure Common SettingsIn the 10g release of Oracle SOA Suite you could set properties to instruct web service calls to go via SOAP or not. If you were calling services on the same server or domain you could gain some performance with a native call and avoiding the SOAP overhead. To do this you would set the optSoapShortcut property.

With SOA Suite 11g on WLS SOAP optimization is automatically configured. In the scenario where you upgraded to 11g R1 and are using this optimization shortcut approach, you should specify the Server URL in the SOA Infrastructure Common Settings. Optimized calls are only active when the host name value (referred to as WSDL URL in the composite.xml) matches the Server URL.

To configure the SOA Infrastructure Common Settings choose from the SOA Infrastructure Menu > SOA Administration > Common Properties. As shown in the screenshot. Other access ways to this configuration screen are described here.

Set the Server URLEnter the server URL in the Server URLs section. This URL is published as part of the SOAP address of a service in the concrete WSDL file. Either set both values to the host name (for example, myhost) or to the full domain name (for example, myhost.domain.com). If these values do not match, a regular SOAP call is performed instead of an optimized local call.

One of the scenarios that you have to set the Server URL in order to use the optimized local call is after a migration of AIA to AIA 11g R1.

Java EE or Spring

Recently I read an extensive blogpost by Frans van Buul on Spring and Java EE. As he points out there are some false arguments in favor of the Spring Framework. It is stated that:

Many of the arguments that have traditionally been brought forward in favor of Spring are invalid or outdated, because they target disadvantages of J2EE 1.4 and prior versions, rather than Java EE 5/6. … the original argument that this is not supported by Java EE is simply gone, and the remaining argument, if present, is much weaker.

If you’re in a position where evaluating these alternatives read the entire blogpost. Generally speaking there is no best way to go. Both are viable frameworks for writing Java applications.

The choice should be made by taking into account the particular requirements and technology strategy of the organizations building and using the application.

If there’s an opportunity we’ll see if we can come up with some rules of thumb for the selection.

MS does have an application platform or

Application Platform Types

Application Platform Types

Recently I was going through an SOA Implementation Survey when I saw the question as shown in the screen-shot. Well I’ve always been under the impression that Microsoft does have an Application Platform (although I must admit even after Google-ing I’m not sure what it is exactly), even for SOA. Did I miss something or is it occasionally just hard to come up with a good survey? Please leave your thoughts in the comments.

Some jBPM, JPA, Hibernate insights

jBPM

jBPM

Few days ago a colleague published an interesting blogpost on jBPM, JPA, and Hibernate. The post was noticed by Tom Baeyens, who until late March 2010 was the project lead for jBPM at JBoss.
Of course JBoss restates their commitment to advancing the jBPM project, but it will be very interesting to see what will come from Tom Baeyens’s new initiative…

JDeveloper on 64-bit Windows7

For a lot of us the migration to Windows7 will be the first time we get easy access to a 64-bit desktop OS. One of the first things after an upgrade like that is to get your tools, like in my case JDeveloper, working again. First step is to download the jdevinstall jar, and the Sun JDK. The installation worked fine:

1
java -jar jdevstudio11112install.jar

Running JDeveloper on 64-bit JVM

Running JDeveloper with the 64-bit JVM resulted in an error:

1
2
3
Unable TO launch the Java Virtual Machine  
located at path:  
C:\Java\jdk1.6.0_18\jre\bin\server\jvm.dll

A solution is to use the 32-bit JVM. To do this change the SetJavaHome in thejdev.conf that is located in the {JDEV_HOME}\jdev\bin\jdev.conf.

1
SetJavaHome C:\Java\jdk1.6.0_18_x86

Where the jdk1.6.0_18_x86 is a 32-bits JVM version.