Author |
Message
|
Harshalw |
Posted: Fri Aug 24, 2012 2:24 am Post subject: import java code in WMB |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
Hello all ,
I am new to WMB and Java. I have a Java code for which I am using RAD. Can I import this Java code into WMB and with some required change can we use this code for executing through WMB.
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 24, 2012 2:53 am Post subject: Re: import java code in WMB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Harshalw wrote: |
I have a Java code for which I am using RAD. Can I import this Java code into WMB and with some required change can we use this code for executing through WMB. |
The WMB Java Compute Node (JCN) runs any Java. This is its strength and its weakness; many people (especially new to WMB people) start out thinking WMB is an application server like WAS and write JCN code like it's an MDB.
Or take an existing MDB and fit it in with a few changes.
This always leads to problems. Don't do it. Write Java that conforms to the expectations and framework WMB exposes. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Aug 24, 2012 2:55 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You don't need Java in 95% of cases. Look at all the WMB nodes and ask an expert (in WMB) how to use the standard WMB features.
Don't use Java unless there is no other choice. WMB is meant to be a non or low programming solution. It is not meant to be a place to host java code.
WMB existed for 10 years without hosting any user-definable Java code - are you really sure that your requirement can't be done in the standard way - I seriously doubt it.
Advice from an experienced WMB developer is essential for those new to WMB and who (in our modern world) have been given no training (how did we come to this terrible amateurish approach?). |
|
Back to top |
|
 |
Harshalw |
Posted: Fri Aug 24, 2012 3:26 am Post subject: |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
WMB is not the only option.
I need to do it in a standard way only however since I know WMB (somewhat) better and find it more easy than Java so I thought of this approach.
Thanks all for suggestions. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 24, 2012 5:05 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 24, 2012 5:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
RAD provides no functions for working with WMB.
WMB Toolkit provides functions for working with Java code.
The place you need to start is to make sure you understand what the Java code actually does. Once you know that, you can consider whether to run it in a JCN or rewrite it in other functions of MB (esql, mapping, etc.), or not run it in Broker at all.
If the code is primarily designed to support user interface actions, you should not run it in Broker. |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Aug 26, 2012 5:01 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
zpat wrote: |
WMB existed for 10 years without hosting any user-definable Java code |
Maybe not quite that long. MQSI had Java custom nodes long before WMB introduced Java Compute nodes, and many developers were equally happy to abuse those at the time.
zpat wrote: |
Advice from an experienced WMB developer is essential for those new to WMB and who (in our modern world) have been given no training (how did we come to this terrible amateurish approach?). |
Perhaps in part because:
zpat wrote: |
WMB is meant to be a non or low programming solution. |
|
|
Back to top |
|
 |
mqjeff |
Posted: Sun Aug 26, 2012 7:20 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
rekarm01 wrote: |
zpat wrote: |
WMB existed for 10 years without hosting any user-definable Java code |
Maybe not quite that long. MQSI had Java custom nodes long before WMB introduced Java Compute nodes, and many developers were equally happy to abuse those at the time. |
[/quote]
Well, it were considerably more messy to write them before v5 came along and gave us eclipse-y things to play with.
It's always nice to look back on things like that and be thankful for the opportunities to have made mistakes and twice as thankful that they are no longer in production. |
|
Back to top |
|
 |
|