-
1. Re: Runtime configuration of EJB / application
vabia Nov 6, 2010 6:38 AM (in response to vabia)Hi,
So let's rephrase the question. It's not a problem to deliver the app with mbean that's visible on JBoss JMX console. Again, this is working fine. However, I need to call MDB methods (e.g. setters) from mbean. How to achieve this? I've tried basic stuff like:
InitialContext jndiContext = new InitialContext(env);
Object ref = jndiContext.lookup("MyEJB");obj = (SocketMessageDrivenBean) PortableRemoteObject.narrow(ref, MyEJB.class);
but I got NameNotFoundException.
Thanks
DV -
2. Re: Runtime configuration of EJB / application
wdfink Nov 6, 2010 7:57 AM (in response to vabia)I don't understand your problem exactly.
You use JCA, and try to reconfigure the socket-port for the third party connection?
If this parameter is configured within the *-ds.xml file you should able to manage this by jmx-console and flush the pool?
But a MDB can not be invoked. The container will invoke on demand!
If you must be able to configure the MDB you might send a special 'configuration message', but this sounds not as a good idea to me because a MDB should be stateless.
Also you are not able to ensure that the re-configuration is correct, what about clustered environment or if more than one MDB receive the message?
-
3. Re: Runtime configuration of EJB / application
kroliczek Nov 15, 2010 4:01 PM (in response to wdfink)I understand David problem because I have similar - I would like create some period task in Jboss and what I found is
@MessageDriven(activationConfig =
{@ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0/2 * * * * ?")})
@ResourceAdapter("quartz-ra.rar")
public class AnnotatedQuartzMDBBean implements Job
{(its is from http://docs.jboss.org/ejb3/docs/tutorial/1.0.7/html/Quartz_scheduler_integration.html
Now simple question is how can I change trigger period from such specific job at runtime?