This content has been marked as final.
Show 2 replies
-
1. Re: How to make an object available in the jndi context?
darranl Jul 15, 2004 6:51 AM (in response to drmack)You could write a servlet and bind the objetc to JNDI in the initialisation of the servlet.
Or in each of your beans you could check if the item has been bound, if it hasn't been bound you could then create and bind it, you will just need to be careful if there is any chance that two could perform the initialisation at the same time.
The MBean approach is possibly the best choice, don't forget that you should unbind the item from JNDI on undeployment of your application, the MBean also makes this easier if you receive the stop notification. -
2. Re: How to make an object available in the jndi context?
drmack Jul 15, 2004 7:17 PM (in response to drmack)Cheers, mate. Thanks for your input. I think you have just confirmed certain conclusions that I had. Thanks again :D