JCAPSMentor - Java CAPS Unleashed - Basic to Expert Discussions

JCAPSMentor - Basic to Expert Discussions Jcaps, SOA, SUN, Netbeans, Enterprise, Sun System Application Server, Java, J2EE, EAI, JBI, Composite Application Platform Suite, EDI, SeeBeyond, HL7, Singapore

 
  FOLLOW US!
  JCAPSMentor

Visit us at Facebook



 

  Visitors LIVE! Stats
 
  Covering the World!
 
Asynchronous call in JCAPS BPEL (JCD)
The java.util.concurrent.ExecutorService interface represents an asynchronous execution mechanism which is capable of executing tasks in the background of a BPEL transaction. 

An ExecutorService is thus very similar to a thread pool. In fact, the implementation of ExecutorService present in the java.util.concurrentpackage is a thread pool implementation.

The below code could be incorporated into JCD (Java Collaboration Definition) to achieve concurrency in JCAPS - BPEL:

 /**
     * JCD Code: Asynchronous call to invoke any method
     * * *
     * @author Manesh Abhimanyu
     * @param String Input 1
     * @param String Input 2
     */
    public void asyncServiceMethod( final String input1, final String input2)
    {
        ExecutorService executor = Executors.newSingleThreadExecutor();
        try {
            Runnable task = new Runnable(){
                public void run()
                {
                    try {
                        invokeJCAPSMentor( input1, input2 );
                    } catch ( Exception ex ) {
                          // handle error which cannot be thrown back
                    }
                }
            };
            executor.execute( task );
        } catch ( Exception e ) {
            // handle error which cannot be thrown back
        }  finally {
            // gargabe collect
            executor.shutdown();
        }
    }






More reading:
Service Execute API


Author: Manesh Abhimanyu.

Labels: , , , , , , ,

 
Handling JavaException fault from JCD to Business Process
It is not possible for the business process to have a fault defined for each custom exception that can be thrown in the JCD. The JavaException fault does however have include the Type, Message and Stacktrace fields. The details of the exception that occurs within the JCD are mapped to these fields. When handling the exception in the business process you can check the values of the these fields to determine what subsequent actions need to be followed.

For example:

- If you highlight the JCD in the business process and then select the properties for the JCD you will see that there is a fault field. This could be set to for example 'ns0:JavaException'.

- You can then add an exception handler to the business process ('Catch Named Exception') and configure it to use 'ns0:JavaException'.

- In the exception handler you can then check the values of the Type and Message fields for the fault and process as required.


 
Default acknowledgement mode in JCAPS
The default is AUTO_ACKNOWLEDGE, where the system automatically acknowledges a message once the consumer has processed it. This mode guarantees at most one redelivered message after a provider failure.
In the AUTO_ACKNOWLEDGE mode, the session automatically acknowledges each message consumed by the client. The session thread blocks, waiting for the broker to confirm that it has processed the client acknowledgement for each consumed message.

If a session is closed without the client acknowledging the message or if the message broker fails before the acknowledgment is processed, the broker redelivers that message, setting a JMSRedelivered flag.

When the transaction mode is set to XA, the JMS session becomes part of the existing transaction, and is processed according to the XA two-phase commit protocol. In the first phase, the resource manager sends a query to commit to the receivers and waits for the receivers to respond with a confirmation. In the second phase, the resource manager receives confirmation from all receivers, and commits the message to all receivers. This setting prevents message loss and duplicate messages, even when a system unexpectedly shuts down.



 
Java CAPS 6.3 (Oracle releases Java CAPS 6.3 on April 7, 2011)
Oracle Java Composite Application Platform Suite 6.3

Oracle Java Composite Application Platform Suite (Java CAPS) combines technologies from Oracle to form a modular and pluggable business integration platform that supports the complete spectrum of service integration requirements. Java CAPS includes repository-based core components and Adapters along with JBI Service Engines and Binding Components, giving you more options and greater flexibility in designing your composite applications. It uses NetBeans as the visual development environment, and the applications you create are deployed on the GlassFish Enterprise Server. This combination allows you to develop custom composite applications, Java EE applications, web applications, mobile applications, and web services using Java EE, JBI, and repository-based components.

This release of Java CAPS provides new support for the following operating systems:

Design-Time

•Microsoft Windows 7 (32 bit)
•Red Hat Enterprise Linux Server 5.5 (32 and 64 bit)

Runtime

•Microsoft Windows Server 2008 R2 (OS: 64 bit; JVM: 32 and 64 bit)

Note -
64-bit OS with 64-bit JVM is not supported on the cluster profile.

•Microsoft Windows 7
•Solaris 10 SPARC Update 4 or later (OS: 64 bit; JVM: 64 bit)
•Solaris 9 SPARC Update 9 or later (OS: 64; JVM: 64 bit)
•Red Hat Enterprise Linux Server 5.5 (OS: 64 bit; JVM: 64 bit)
•IBM AIX 6.1 (TL2 or later) (OS: 64 bit; JVM: 32 bit)
•IBM AIX 6.1 (TL2 or later) (OS: 64 bit; JVM: 64 bit)
•SUSE Linux Enterprise Server 10 SP1 or later (OS: 64 bit; JVM: 32 bit)
•SUSE Linux Enterprise Server 11 (OS: 64 bit; JVM: 64 bit)
•SUSE Linux Enterprise Server 11 (OS: 32 bit; JVM: 32 bit)

No Longer Supported

•Apple Mac OS X
•OpenSolaris
•Windows Vista
•Windows Server 2000


Java CAPS 6.3 no longer provides default administrator and master passwords for GlassFish server. You need to specify these passwords manually, adhering to Oracle security standards. The passwords must contain:

•Eight or more characters
•One or more numeric digits
•One or more lowercase characters
•One ore more uppercase characters

For the Repository-based Java CAPS Installer and Enterprise Manager, the default user name and password remain the same (admin and adminadmin, respectively), but you should not use this default user in production. Instead, create a new user in User Management for production.

The JCAPS 6.3 release includes support for Oracle WebLogic JMS and Advanced Queueing for Repository-based Java CAPS components.

New JBI Components in JCAPS 6.3 release
The following components were added to Java CAPS for this release.

•COBOL Copybook Encoder
This new component is a fixed-length field-based encoder that provides the tools you need to define and test COBOL Copybook encodings as well as provide runtime support for the encoders.

•Email Binding Component
This new component supports configuration and connection to email servers within a JBI environment, allowing email messages to be sent from and received by a Java CAPS application. It supports POP3, IMAP, and SMTP.

•HL7 Binding Component
This new component allows Java CAPS applications to establish and maintain connections with HL7 v2 messaging systems, manage message enveloping and routing, and perform message validations.

•Rest Binding Component
This new components provides external connectivity for REST over HTTP, which allows external systems to invoke RESTful web services hosted by Java CAPS and allows Java CAPS to invoke external RESTful web services.

•POJO Server Engine
This new component allows you to define business logic in Java (as Plain Old Java Objects) and then deploy those business objects in a Java CAPS application, providing a simple and flexible method for using Java in integration applications.

•Worklist Manager Service Engine
This new component allows you to define manual tasks to be inserted into an otherwise automated workflow, such as a BPEL process, and to then manage and monitor the handling of any generated tasks.

Labels: ,

 
New features in JCAPS 6.3 release
•Design-Time now supports Netbeans IDE 6.9 GUI.
•Glassfish Enterprise Server 2.1.1 patch 9 is now supported.
•Supported JDK versions are 1.6.0_20 or later. Specific platforms supported
•Java CAPS 6.3 has several new Operating Systems Supported
•Browser updates include added support for Firefox 3.5.2 and Internet Explorer 8.0
•A new “Replicate Repository Utility” is a handy way to create a Disaster Recovery version for example.
•Another new utility is the “Listing Repository Objects”.
•Oracle has added several ways to interoperate with Oracle’s SOA Suite/Fusion including via Oracle’s JMS
•Several new JBI binding components added to this release including the HL7 Binding Component.
•Java CAPS 6.3 no longer provides default administrator and master passwords. This means that the password file that was previously created during installation for the master password is no longer created.
 
How to Replicate the JCAPS Repository
1.Do the following on the source server:

a.Start the repository.
b.Change to the directory where the replicate utility (replicate.bat or replicate.sh) is located (JavaCAPS_Home\repository\repository\util).
c.Create a backup of the source repository by running one of the following commands, replacing the parameters with actual values:
•For Windows: replicate.bat export username password RepositoryBackupFileName
•For UNIX: replicate.sh export username password RepositoryBackupFileName

2.Do the following on the target server:
a.Ensure that the Java CAPS Repository CD1 (or a copy of its contents) is available on the target server.
The location of the installation files is a required parameter for the replicate utility.
b.Copy the following files from the source server to the target server:
•JavaCAPS_Homerepository\repository\util\replicate.bat (on Windows) or JavaCAPS_Homerepository/repository/util/replicate.sh (on UNIX)
•JavaCAPS_Homerepository\repository\util\repositoryutil\com.stc.repositoryutil.jar
•The backup file created above from running the replicate utility on the source machine. If you do not want to copy the files from the source machine to the target machine, you can create a shared network directory on the target machine that points to the respective directories on the source machine.
c.Navigate to JavaCAPS_Home\install\docs and open either unix-install.properties or win-install.properties, depending on your operating system.
d.Modify the configuration settings for your installation.
•CHOSEN_INSTALL_FEATURE must be set to Repository.
•The following properties must be configured: USER_JDK_HOME, USER_INSTALL_DIR, REPOSITORY_NAME, and REPOSITORY_ADMIN_PORT.

Note -
For Windows repository replication, the USER_JDK_HOME and USER_INSTALL_DIR directory values must contain double backslash characters after the drive designation (for example, C:\\JavaCAPS).

e.Save and close the file.
f.Change to the directory where the replicate utility is located.
g.Start the replicate utility by running one of the following commands:
•For Windows: replicate.bat import RepositoryImagePath BackupFile RepositoryPropertiesFile
•For UNIX: replicate.sh import RepositoryImagePath BackupFile RepositoryPropertiesFile
where:
•RepositoryImagePath is the location of the Java CAPS installation file on the Java CAPS Repository CD1
•BackupFile is the location of the backup file created by running the replicate utility on the source machine
•RepositoryPropertiesFile is the location of the properties file you configured earlier

The contents of the original repository are now available in the new location. The target repository can be started by running the repository startup command (startserver.bat for Windows or startserver.sh for UNIX) from the TargetRepositoryPath directory.

Labels: ,

 
JCAPSMentor - JCAPS Forum Started!
Our forum (http://jcaps.forumotion.com/) has started, you can use it to post any question.


Lets Discuss, Share and resolve JCAPS! :)

Click here to visit the forum

Cheers!
Mak

Manesh Abhimanyu K.
JCAPSMentor.com

Labels: , , ,

 
Manesh Abhimanyu
Manesh is a Sr. EAI Consultant, at present working in Singapore (Little Red Dot).

His focus is in the areas of SOA, ESB and Enterprise Architecture Management.

Contact him via email (mak2powerATyahoo.co.in)

Menu
Archives
Links
Website developed & maintained by

Manesh Abhimanyu K. (Mak)

Click here to contact Manesh









Free Domain CO.NR