I'm fairly weak with EJB, so I need your guidelines.
I have application which has several EJBs. One of them is message driven bean (MDB). The application use some library which has to be initialized. At the moment I put library's initialization code in a method ejbCreate() of the MDB. This is not convenient because library requires quite long time for initialization and this initialization occurs only when first message for MDB arrives.
So question is how to initialize library for MDB at server's startup. I saw that for example WebSphera has ability to mark bean as initialized at application's startup time. Is this possible in JBoss, or may be JBoss has other way to achieve that aim?
Thanks in advance.
i would suggest moving the code that needs to be initialized to a stateless session bean. that way you're mdbs won't have a long startup time. you could try configuring how many of those session beans are kept in the pool.