File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any one used ApplicationLifecycleListener for application deployment life cycle event

 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want my server app to be notified by the container when the application has been deployed into the server. To implement that I am extending this class, ApplicationLifecycleListenerWeblogic Dos for ApplicationLifecycleListener

The methods in this class get called before any of the Ejbs are added to the JNDI tree, as result of which I cannot call any ejb methods from during initialization.

Anyone know a way aroung this. ?
 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I managed to locate my problem.

From with in the ApplicationLifecycleListener
void postStart(ApplicationLifecycleEvent evt)

I was calling looking up a EJBLocalHome, and I couldnt find it on the JNDI tree ( I was getting a LinkException), I changed that to look up the EJBHome( i.e Remote Home ) and it works fine.
It also makes sense, since EJB Local Homes can only be called from within EJBs in the same EAR. And I dont think the application life cycle is part of the same EAR...I think. Well that is my reasoning of why it didnt work, I have to dig deeper to find the exact reason, but dont seem to have the time for that.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic