Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loading from database when application start

 
rudra tripathy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,
i want to retrive data and put it into in memory.
i am defined a method for it.
i am using ejbcreate() of stateless session bean.
can i call the method directly from ejbcreate()
 
Abhishek Asthana
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You have not mentioned anything about your server. Any way you can access the database directly from ejbCreate() but it is STRONGLY RECOMMENDED that you don't do so.
Make a helper class which has a function defined that accesses the database and returns result to your ejbCreate(). Call this function from your ejbCreate().
If you have any doubt, please tell me.
Abhishek
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic