aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Help about an EJB session context issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Help about an EJB session context issue " Watch "Help about an EJB session context issue " New topic
Author

Help about an EJB session context issue

Ahmet Simsek
Greenhorn

Joined: Nov 22, 2012
Posts: 1
Hi,

I am working on a servlet application which invokes a web service. This web service is an ejb based web service which has also some utility classes. One utility class is getting ejbsession context parameter from a bean class and trying to get message context from that ejb session context variable but it fails there. I get an illegalstateexception. Here is the error trace :

java.lang.IllegalStateException: SessionBean: getMessageContext not allowed from Non-WebService Endpoint method
[11/22/12 14:47:08:542 EET] 00000051 SystemErr at com.ibm.ejs.container.SessionBeanO.getMessageContext(SessionBeanO.java:334)

Almostly all the ejb forums i have visited are telling that it resulted because of that fact that session context is in a wrong state and it can not invoke getMessageContext method. During debug activity i am changing the value of ejb session context variable just to find the true state but it doesnt work for any state. When i inspect ejb session context variable i see four session context state strings, They are : [DESTROYED, POOLED, IN_METHOD, PRE_CREATE]. The error comes with the session context variable happen when it has IN_METHOD state. I tried to change the value of the state to the other ones that i have listed below, but it doesnt work. I dont know what is going wrong, what must i do ?

Thanks for your help and attention..
broken jhone
Greenhorn

Joined: Dec 06, 2012
Posts: 1
that doing an application commits transaction on multi-databases with different schema, I’m confused of the pattern that doing such action. i will dependent on the following software’s and tools.


broken555
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help about an EJB session context issue