Join wMUsers | Blog at wMUsers | Edit my wMUsers Profile | Site Map | webMethods Jobs |For Employers

wMUsers  
  #1  
Old 01-30-2006, 20:34
reamon's Avatar
reamon reamon is offline
Premium Member
 
Join Date: Apr 2003
Posts: 4,789
Thanks: 61
Thanked 177 Times in 140 Posts
Default Integration Server and Java

It may just be my perception but it seems like there has been an unusual number of questions about how to do things in Java within Integration Server. I thought I'd post a gentle reminder of the three guiding principles of Integration Server development:

1. Don't write it in Java.
2. Don't write it in Java.
3. Don't write it in Java.

;-)

Of course that's an extreme point of view but it's worth keeping in mind. There have been various discussion threads over the years about the use of Java services. For example, this one from 2002. These threads have generally had several posters (including yours truly) pointing out that use of Java should be the exception, not the rule. Our esteemed founder, Dan Green, stated: "Without sounding melodramatic, Java developers can significantly increase a project's time-to-market and ruin your ROI."

It is quite tempting to write things in Java, particularly when one has a Java background but is new to FLOW. Generally speaking, using Java services to accomplish most tasks is not necessary. Processing XML, interacting with databases, manipulating lists and strings, mapping data elements and more can all be done without using Java. As a rule of thumb, all these should be done without using Java.

Using Java makes development and debugging more difficult. It generally takes much more effort to do many things in Java services which can be easily accomplished in a couple of FLOW steps.

Last edited by reamon; 03-07-2006 at 10:32.
Reply With Quote
Advertisement
  #2  
Old 01-30-2006, 20:40
mcarlson's Avatar
mcarlson mcarlson is offline
Admin
 
Join Date: Jan 2002
Posts: 3,895
Thanks: 27
Thanked 56 Times in 39 Posts
Default

Rob,

Thanks for the words of wisdom. I could not agree more!

On each project, I usually find a need to create few small java services to provide utility-like functions. Other than that, I do all of my work in Flow.

BTW, I can't believe you used that lame character-based smilie!

Mark
__________________
Conneva, Inc - webMethods Architecture Consulting


Reply With Quote
  #3  
Old 01-30-2006, 21:24
reamon's Avatar
reamon reamon is offline
Premium Member
 
Join Date: Apr 2003
Posts: 4,789
Thanks: 61
Thanked 177 Times in 140 Posts
Default

Yeah, I do the same. There are some things where Java is a good thing to do but I think the key phrase is "few small java services". The posts of late have been asking about doing significant parsing work or database interaction, which should always be questioned with a critical eye--"do I really need to do this in Java or am I just doing it cuz it 'seems' easier?"

Character-based smilies are so old they're back in style! Go retro! :-)
Reply With Quote
  #4  
Old 01-31-2006, 04:21
andrejan andrejan is offline
Member
 
Join Date: Nov 2002
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi reamon,

I'm one of those people who asked a java question. You responded to it and convinced me that doing it in java was actually almost the same as doing it in flow. I'm not a java programmer, so I know why *I* should avoid java programming. ;-)

I think in general you should avoid java as much as possible, there are only three reasons to use java:
- Performance reasons
- It can't be done in the flow language
- Need for utilities which are not provided by webMethods, but which can be built using the wM java API (documented and undocumented).


You may have a character-based smilie, at least you have an avatar! "Mine" is lost during the migration.
Reply With Quote
  #5  
Old 03-07-2006, 10:42
reamon's Avatar
reamon reamon is offline
Premium Member
 
Join Date: Apr 2003
Posts: 4,789
Thanks: 61
Thanked 177 Times in 140 Posts
Default

Quote:
Originally Posted by andrejan
I think in general you should avoid java as much as possible, there are only three reasons to use java:
- Performance reasons
...
Yes, writing key services in Java can boost performance. The key to the effectiveness of this is to profile the integration to identify bottlenecks. Then optimize the bottlenecks. One should resist the urge to write a service in Java simply because of a belief that it needs to be fast. There are more considerations at hand than just speed. Readability. Maintainability. Debugging. All these need to be considered. Prematurely writing a service in Java risks reducing all the "-ilities" for marginal or no speed gain. Before negatively impacting the "-ilities", one should be sure that the speed gain is meaningful.
Reply With Quote
  #6  
Old 09-20-2006, 03:31
Gert Versteeg Gert Versteeg is offline
Junior Member
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Joined the forum only yesterday because of my struggle with java during our migration from 4.6 -> 6.5.
Problem was I wanted to move a directory from the C to the D drive; but the path is hardcoded in a java service.
1) IS could not find a java compiler -> I installed a java compiler;
2) then it started to complain about errors in a module I never heard about.
3) studied the developer documentation and found out that all java services in a package are thrown on a big pile and that the compiler error could be caused by any java service.
Then I decided to get rid of it completely!
Motivation: I can not imagine that it is not possible to rename a file in the file system or to create a subdirectory without using anything but flow.
I will, when needed place questions in the correct forums of cause.
Reply With Quote
  #7  
Old 09-20-2006, 07:34
mcarlson's Avatar
mcarlson mcarlson is offline
Admin
 
Join Date: Jan 2002
Posts: 3,895
Thanks: 27
Thanked 56 Times in 39 Posts
Default

Gert,

Setting the path to the java compiler is a common one-time only step. That step is covered in the installation guide.

Sounds like you have inheirited a poorly designed application. Java "services" are just methods in a class. Multiple services are stored in the same class only when they are placed in the same folder in the navigation panel. You can place all of the services in one folder, just as you would place multiple related methods in the same class.

Creating simple utility services to interact with the operating system certainly falls within the intended uses of java services.

Mark
__________________
Conneva, Inc - webMethods Architecture Consulting


Reply With Quote
  #8  
Old 09-20-2006, 17:30
ramchalluri ramchalluri is offline
Member
 
Join Date: Apr 2005
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

As Mark pointed out your questions are toothing issue and can be resolved very easly. Let us know how you go with your project.
Reply With Quote
  #9  
Old 09-25-2006, 18:40
arydewo arydewo is offline
Junior Member
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Writing java services on Integration Server is surely become a problem for some people who usually solve their problem by creating flow services.
Sometimes we need to create java service for these reasons :
- Service with complex algorithm. (Performance issue)
- Some problems that could not be solved by creating flow service. I.e : accessing back end system using API.

Writing java service we need to see about the library needed. We may put it on the classpath or simply put the library on the packages/[package_name]/code/jars folder.

I usually create java code using external editor (eclipse, jdev) to ensure that my code did not contain any error and working fine and then deploy it to the Integration Server.

Regards,
arydewo/HP
Reply With Quote
  #10  
Old 09-26-2006, 00:58
Gert Versteeg Gert Versteeg is offline
Junior Member
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi all,
I did my job and studied the docs on java. Even borrowed a book in the local library (JAVA 2 Easy computing Guide, Data Becker 2000)
By studying the advantage webside I found out that the service the compiler is complaining about used to be part of the no longer supported wmsamples package. It is a service (wcarddir) that processes directory listings with wild cards.
I did not find a build in flow service that does the same; not even a flow service that returns a directory listing from the local file system.
So I guess a I am convicted to java.
regards
Gert
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data flow diagrams for Integration of Purchase Order from a Partner to SAP system using Trading Networks and Integration Server SAP Adapter Anitha reddy Flow and Java services 5 12-27-2009 00:07
Configuring a Fabric Server to Run in the Integration Server%92s Embedded Tomcat Instance mcarlson SOA Service Development (Web Services, SOAP and WSDL) 3 11-19-2004 10:18
How to set JVM parameters for java services created in Integration Server development tool vivekkum Flow and Java services 2 11-28-2003 04:05
Should I migration Mainframe Integration ServerMIS to Integration Server zhao Product Migration and Upgrades 1 07-10-2003 08:30
Question Reasons for deployment of Enterprise Server over Integration Server flash64 webMethods Architecture 11 05-09-2003 07:36


All times are GMT -6. The time now is 00:30.


.
All Content Copyright ©2002-2009, Conneva, Inc. DBA wMUsers.Com

wMUsers is an independent organization and is not sponsored in any manner by Software AG or webMethods, Inc.

Page generated in 0.10326 seconds with 17 queries