This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes How to define some mehod for global resource initializtion and recycle in JBoss container! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to define some mehod for global resource initializtion and recycle in JBoss container!" Watch "How to define some mehod for global resource initializtion and recycle in JBoss container!" New topic
Author

How to define some mehod for global resource initializtion and recycle in JBoss container!

kong song
Greenhorn

Joined: May 12, 2009
Posts: 13
I have some customize data and process need to be initialized only once when Jboss AS is starting.
I have used some ejb Life Cycle Event to handle it,but the result seems not well.

so,How can I define some method or service for initializing global resource and container just only call once? and How about recycle such resource only when the container is closing.

Thanks!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
161

See the JBoss specific @Service http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.7/html/Service_POJOs.html


[My Blog] [JavaRanch Journal]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to define some mehod for global resource initializtion and recycle in JBoss container!
 
Similar Threads
A Question about The Life Cycle of a Stateless Session Bean
JDBC ORACLE - java.sql.SQLException: ORA-3160
How to lookup an EJB in Servlets?
Session Beans - Table
how to configure java.net.URL outside of .war