• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent Pls..... MDBs calling One Session Bean

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

We developed an Enterprise Application which contains 11MDBs which reads messages from different queues and call only one Stateless Session Bean to perform business processes.

We use IBM WAS 5.1.0.5,IBM Websphere MQ 5.3 (CSD011) which run under OS windows 2000 server. The business process is in Oracle 9i Stored Procedure.

If I start one listener out of 11, it works fine. If I start morethan one listener, I am getting the following exception:


[11/30/05 10:26:47:719 AST] 7f3123b4 ServerSession W WMSG0031E: Exception processing JMS Message for MDB Group02MDB, JMSDestination Group02 : java.lang.NullPointerException
at exe.rpt.Group02MDBBean.onMessage(Unknown Source)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
at com.ibm.mq.jms.MQSession.run(MQSession.java(Compiled Code))
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java(Inlined Compiled Code))
at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java(Compiled Code))
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)

[11/30/05 10:26:48:062 AST] 7f3123b4 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "onMessage" on bean "BeanId(CSEFixEAR#CSEFixEJB.jar#Group02MDB, null)". Exception data: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java(Compiled Code))
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: java.lang.NullPointerException
at exe.rpt.Group02MDBBean.onMessage(Unknown Source)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java(Compiled Code))
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java(Compiled Code))
at com.ibm.mq.jms.MQSession.run(MQSession.java(Compiled Code))
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java(Inlined Compiled Code))
... 8 more


Questions:

1) Do we need to write 11 session beans for 11 MDBs. (Bsiness process are same).
2) Is there any way to tune listeners or MDBs so as every thing works fine.
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you want 11 session beans which do the same thing? As SLSBs are pooled, you have to make sure that the pool size is adequate for your application.

As for the MDBs ... You must have only one bean type associated with a particular JMS queue. Do not associate more than one bean type with a queue.
 
Mohsin Kayal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mr.Roger,

We have 11 MDBs which are looking 11 queues. I don't know how to increase the pool size of the SLSB in IBM WAS 5.1. Could u pls. give me the details.

Thanks indeed
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mohsin,

I�m no WAS expert and I cannot tell you how you can do this with WebSphere (this is the reason why I�m not answering to your other posting). However this is a very easy to accomplish task and it might be vendor dependent. As per J2EE specs each ejb should be accompanied by a specific deployment descriptor file: ejb-jar.xml. Most of the containers though provide an extra deployment descriptor to control other container specific settings. Weblogic for example provides a weblogic-ejb-jar.xml. Here you can configure each SLSBs� free pool, using the initial-beans-in-free-pool and max-beans-in-free-pool deployment tags (the names are self descriptive though). I guess that WebShphere is using a similar approach.
I hope this will narrow your search and will point you to the right direction.
Regards.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Roger Chung-Wee:
Why would you want 11 session beans which do the same thing? As SLSBs are pooled, you have to make sure that the pool size is adequate for your application.



I'd have to agree, 11 queues that are all used by the same session bean seems like a waste of resources. I'd configure them all to go to the same queue, and have the MDB read message header information (and not the message) in order to determine the exact address/process.
 
Mohsin Kayal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to all,

My requirement is to process the message in strict order and moreover it has to be very fast (say 100 msgs/sec). That is why I opted to go with 11 queues.

Now I have 11 MDBs and only one session bean and I got the solution.

My Sincere thanks again to all.
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the guys above didn't read your question correctly. You are simply talking MDB's servicing 11 queues, 1 SLSB services the 11 MDB's.

This is a good strategy, I understand what you are trying to do. Setting the maxsession (1) in the MLP/qcf will guarantee process order alhthoug perf suffers obviously becuase there is no connection pooling on the MDB's but it meets your business requirement.

You also need to check within th QCF to ensure you are using CLIENT bindings or the 1st MDB will start but the rest will fail, be sure to use separate SVRCONN channels for these too.

this should fix the issue
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic