czwartek, lutego 05, 2009

WebObjects - easy WebMethods development in Java

WebObjects framework provides easy way for WebMethods development using Java.
For every flow, java or adapter service existing in a IS package the framework generates Java beans covering pipeline's input and output, and packs generated classes into one jar file. So for every document used as a pipeline's input or output you get a Java class. You don't have to do complex multi-step flow mappings, you can do your job easily in Java. You operate on real Java objects, not on pipeline's keys and values. From Java you can call other services using Java objects.
All development can be done in Eclipse after importing jar file generated by WebObjects from IS package.



On the picture above you can see a Java service called abcd. It uses JDBC adapter service called invokeFb. WebObjects framework generated invokeFb_In and invokeFb_Out classes for that service. Service invokeFb exists in test.sql namespace, its input and output classes (invokeFb_In, invokeFb_Out) were generated in pkg.test.sql Java package. DataProxy.invokeService() method called with invokeFb_In object, knows exactly which service to invoke and what object should be returned.
You can generate jars for WmPublic and WmRoot and call native WM services from Java.

Under heavy load with huge documents processed by flow services it is possible to hang Integration Server - pipeline's objects have circular references and they are hard to process by Garbage Collector. One work around is to mark services as stateless, change session lifetime from 10 to 2 minutes, tune GC (concurrent mark sweep), the other is to change JVM to JRockit (but then your installation is not supported by Software AG).
With WebObjects you just call DataProxy.clear(pipeline) between getting Java input object from pipeline and putting output.
How to get and put objects? If invokeFb were a Java Service written with WebObjects you would do:

invokeFb_In in = DataProxy.unbox(pipeline, invokeFb_In.class);
invokeFb_Out out = new invokeFb_Out();
// do something with out
DataProxy.box(out);

0 komentarze: