Thread logging on JBoss
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
Add comment 2 December 2008 at 11:53 AM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
Add comment 2 December 2008 at 11:53 AM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
1 comment 27 February 2008 at 3:52 PM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
Add comment 17 January 2008 at 11:12 AM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
Add comment 10 January 2008 at 12:23 PM
It needs to deploy RMI Adaptor service in singleton. I can do it creating file above in deploy-hasingleton (singleton-jmx-adapter-service.xml will be ok, it’s necessary it ends with -service.xml):
<server>
<mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory" name="jboss.jmx:type=singletonadaptor,name=Invoker,protocol=jrmp,service=proxyFactory">
<!-- Use the standard JRMPInvoker from conf/jboss-service.xxml -->
<depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp
<attribute name="ClientInterceptors">
<interceptors>
<interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
<interceptor>org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor</interceptor>
<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
</interceptors>
</attribute>
</mbean>
</server>
Then inside any session of any cluster node I can invoke a method of MBean Service in this way:
final String RMI_ADAPTOR_JNDI_NAME = "jmx/invoker/SingletonRMIAdaptor";
final String IDTAG_SERVICE_JNDI_NAME = "MyService:service=MyManagerService";
try {
final Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "10.x.x.1:1100,10.x.x.2:1100"); // HA
InitialContext initialContext = new InitialContext(properties);
RMIAdaptor adaptor = (RMIAdaptor) initialContext.lookup(RMI_ADAPTOR_JNDI_NAME);
ObjectName objectName = new ObjectName(IDTAG_SERVICE_JNDI_NAME);
if (adaptor != null && adaptor.isRegistered(objectName)) {
obj = adaptor.invoke(objectName, methodName, params, signature);
} else {
logWriter.debug("---- Error invoking MyManager service: " + adaptor + " ----");
throw new Exception("Error invoking MyManager service");
}
} catch (NamingException ex) {
logWriter.error(ex);
throw ex;
} catch (MalformedObjectNameException ex) {
logWriter.error(ex);
throw ex;
} catch (IOException ex) {
logWriter.error(ex);
throw ex;
} catch (InstanceNotFoundException ex) {
logWriter.error(ex);
throw ex;
} catch (MBeanException ex) {
logWriter.error(ex);
throw ex;
} catch (ReflectionException ex) {
logWriter.error(ex);
throw ex;
}
That’s all…
Buzz This Post
Delicious
Digg This Post
Ping This Post
Add comment 13 September 2007 at 6:17 PM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
1 comment 2 November 2006 at 10:43 AM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
18 comments 20 October 2006 at 7:45 PM
Sorry, but this post is not available in English
Buzz This Post
Delicious
Digg This Post
Ping This Post
3 comments 10 October 2006 at 2:43 PM