Hi,

I think the eventual solution will be to have it possible to deploy mbeans
in an application, loaded with the application's classloader.  Hopefully
this is coming soon with marc's .jsr or .sar's for rabbithole.

Meanwhile...

1. I think you just need the interfaces in lib/ext.  While unpleasant,
wrong, and a big pain, its not quite as bad as needing the beans too.

2. If you would like to experiment, you could try writing a ejb that gets
the mbean server and creates your mbean using the apps classloader.  This
won't really help you out now, you'd still have to find a way to call this
ejb, but it would show that the "deploying mbeans as part of an
application" will work.  If you do this please let me know.

Maybe there's an easier way?  Probably using reflection on the interface
from jndi would work too.

david jencks

On 2001.08.10 12:23:48 -0400 Rick Horowitz wrote:
> Hi,
> 
> I have a task that I have to run periodically on my EJB server.  I plan
> to 
> use the Timer MBean, as described in the JBoss documentation.  In 
> conjunction with that, I had thought to create an application-specific 
> MBean that would startup after the Timer MBean and run this task at
> startup 
> time.  But I realized (after coding it) that it causes classpath 
> problems.  The reason is that the application-specific MBean is loaded
> from 
> the JBoss classloader, but needs to call code that is loaded by the EJB 
> classloader.  Moving this code from the EJB classpath to the JBoss 
> classpath would require that I move the EJB itself to the JBoss
> classpath, 
> because the EJB is used by this task to access the database.
> 
> So, what I'm looking for are suggestions as to the best way to run a 
> periodic task that uses EJBs -- once when JBoss starts up, and then once 
> each period.  I still plan to use the Timer MBean to manage the timeout 
> periods, but I need a way to run this the first time (and set it up as a 
> periodic task) as soon as JBoss is finished with its startup.
> 
> Suggestions are welcome.  Thanks in advance.
> 
> --------------------
> Rick Horowitz
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to