you can bind it to JNDI or invoke through reflection
I believe you can find examples in the jboss documentation

-dom

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 09, 2001 10:02 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Accessing MBeans through EJBs



I have a somewhat unusual configuration, and I wanted to see if anyone
could give some advice.

I have created an MBean to act as a queue of jobs that are to be dispatched
to separate machines to process those jobs (I couldn't create the queue as
an EJB because I need to manage my own threads here). I'd like to know if
it's possible to get an instance of this MBean in an EJB to call out to it.
Thus, here is my standard flow:

Client App:

CommandProcessor cp = commandProcessorHome.create();
cp.processCommand(arg1, arg2);

And then in the CommandProcessorBean (a stateless session bean):

public void processCommand(String arg1, String arg2) {

  DispatcherMBean dispatcher = ???; //how can I get a handle to the MBean?
  dispatcher.dispatch(new CommandObject(arg1, arg2));
}


Anyone have any clues on how to do this?

Thanks,

Alex



_______________________________________________
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