• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Client Hanging until J2EE server restarted. Please Help!  RSS feed

 
Gary Moncrief
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running an EJB on a Sun Java System Application Server (8.0.0_01)

I have an EJB that runs on several servers retrieving data from a historian database. The EJB works great... most of the time. But once in a while the client accessing one of these EJB's locks up indefinitely. I have to restart the EJB Server to unlock the client.


Here is the portion of my code that connects to the EJB. When the lockups ocurr, its at: Context ctx_server = new InitialContext(env);





What is causing this hangup, and how can I set a timeout? Thank you for the help with this ever more painful problem.
[ March 20, 2006: Message edited by: Gary Moncrief ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a firewall between the client and the EJB server?
 
Gary Moncrief
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Roger Chung-Wee:
Is there a firewall between the client and the EJB server?


No firewall. Will the Application Server lock up if too many EJB objects have been created? I think my problem might be related to that??
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gary Moncrief:

Will the Application Server lock up if too many EJB objects have been created? I think my problem might be related to that??


Hi Gary,
has that problem been fixed already? If not:

Is the bean a stateful session bean? If yes:

Are there any static variables or member variables that may not survive passivation and activation? Did you try to print out their physical address (without toString()) within passivate() and activate() and compare the adresses? Did you compare the values within activate() too?
Is there any "optimization" like caching referenzes to a database or any environment? If yes then for testing remove all this optimization. When all runs well after that then re-add your optimizations until the error recurs.

Passivation and activation is pool related too, that is where my thoughts come from.

Just some ideas, maybe one of them helps.
I would be very interested to hear the reason and the solution.
Good luck
Thomas
[ March 22, 2006: Message edited by: Thomas Taeger ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will the Application Server lock up if too many EJB objects have been created?

If this were to happen, then you are using a very poor server. Frankly, this is unlikely to be the cause.

You say that lockup happens when instantiating InitialContext. How do you know that this is the cause?

Also, what does your server log say?
 
Gary Moncrief
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Roger Chung-Wee:

You say that lockup happens when instantiating InitialContext. How do you know that this is the cause?


- From debug printouts before and after instantiating the InitialContext
- I did not see anything in the logs
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!