Author |
Message
|
harneet.sachdeva |
Posted: Wed Mar 02, 2011 2:59 am Post subject: Java Compute Node Spring framework |
|
|
Newbie
Joined: 02 Mar 2011 Posts: 4
|
Has anybody tried integrating Spring framework in Java compute node. I am trying the same but it is failing to find ApplicationContext.xml. Would appreciate any help |
|
Back to top |
|
 |
harneet.sachdeva |
Posted: Wed Mar 02, 2011 4:07 am Post subject: |
|
|
Newbie
Joined: 02 Mar 2011 Posts: 4
|
I tried using:
ApplicationContext context = new FileSystemXmlApplicationContext("c:\\ApplicationContext.xml");
TestBean testClass = (TestBean)context.getBean("test");
But this code throws following exception:
"Cannot find class [test.TestBean] for bean with name 'test' defined in file [c:
\ApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: test.TestBean"
The class file is present in the bar under java project folder |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 02, 2011 4:18 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
People certainly HAVE been successful integrating Spring into a JavaCompute node.
You need to reexamine VERY STRONGLY your desire to do so, however.
Spring is not lightweight, and Spring very likely is doing many things that you should simply be letting Broker itself do for you.
So what *business* requirement do you have for using Spring inside Broker? What are you trying to do?
Also, moderators please move this to the Broker forum. |
|
Back to top |
|
 |
harneet.sachdeva |
Posted: Thu Mar 03, 2011 3:54 am Post subject: |
|
|
Newbie
Joined: 02 Mar 2011 Posts: 4
|
mqjeff thanks for the reply...would appreciate if somebody can help out here |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Mar 03, 2011 4:49 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff wrote: |
Spring is not lightweight, and Spring very likely is doing many things that you should simply be letting Broker itself do for you.So what *business* requirement do you have for using Spring inside Broker? What are you trying to do? |
These are good questions, what are the answers. WebSphere Message Broker is not WebSphere Application Server. Spring works nicely with WAS because it does alot of stuff for you.
WMB is a high-speed messaging engine. Why would you want to slow it down with Spring in a JCN? What *business* requirement do you have for using Spring inside Broker?
What are you trying to do? Maybe we can suggest a better alternative to your goal. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
harneet.sachdeva |
Posted: Thu Mar 03, 2011 9:44 pm Post subject: |
|
|
Newbie
Joined: 02 Mar 2011 Posts: 4
|
Thanks Guys..I am doing a POC...I want to check out this approach also...Another observation here, it seems like Spring classes are getting loaded in shared classloader intead of egshared classloader although I have my spring jar in the bar file instead of shared classes. Would appreciate any help..I am a newbie to WMB... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Mar 04, 2011 4:55 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
What concept are you trying to prove? What we are saying is we can't think of any worthwhile reason to do what you are doing. Proof of what concept? What is your goal? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
bsiggers |
Posted: Fri Mar 04, 2011 9:28 am Post subject: |
|
|
Acolyte
Joined: 09 Dec 2010 Posts: 53 Location: Vancouver, BC
|
Just for reference, I never worked at any site that had Spring bits and pieces running in JCNs - it's a bit of a technology mis-use in my opinion. When something requried framework-level real processing, Broker normally passed messages via MQ to certain queues, where there were JBOSS-based MDBs listening on the queues and from that point onwards Spring-based frameworks were used.
I wish you good luck though with whatever it is you're trying to do. |
|
Back to top |
|
 |
|