• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

EJB Client Hanging until J2EE server restarted. Please Help!

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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??
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic