Hi!
Lars Bj�nnes wrote:
> > I would recommend doing this as a JMX MBean that you add after the
> > AutoDeployer in jboss.conf. In the MBean you can call your EJB's to
> > cause them to be preloaded. Use the NoPassivationCache for best results
> > in your case (edit container configurations to do this).
>
> Is there a "My first JMX MBean for the aspiring programmer"-source/doc
> or similar on the net? :-)
Nope, but most of the MBeans in jBoss should work for you. Look at
org.jboss.util.ClassPathExtension(MBean) for example. Copy/paste and
replace with your own code. Add to jboss.conf (find the pattern ;-).
Done.
> But, to check if I understood the concept:
>
> Given database-table logon:
>
> id int
> name varchar
> password varchar
>
> In the MBean, I just do a query, and for each record in the table
> logon I find, I call
>
> MyLogonHome.findByPrimaryKey(new MyLogonPK(id from table))
>
> Since I have specified NoPassivationCache, the the EJB's will remain
> populated, even after the MBean has lost reference to it?
Correct.
> (In which configuration file should I put the NoPassivationCache-
> directive? The EJB's ejb-jar.xml? jboss.xml? The conf/jboss.xml? )
jboss.xml. Use the EJX tool to create custom container configurations,
and then choose the custom one for your beans.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]