cancel
Showing results for 
Search instead for 
Did you mean: 

MBeanServer will be invalid after the client of MBeanServer long running

Former Member
0 Kudos

I develop a java applcation,It is as a client of MBeanServer, It will use the MBeanServer to query some system info from WebAs, But after a long run (about for one days), The MBeanServerConnection will be broken and invalid ,When call the queryMBean , It will throws some SecurityExceptions about "Use not authorized".

I use the remote mode to get the MBeanServerConnection as belows source code:

Properties connectionProperties = new Properties();

connectionProperties.setProperty(Context.INITIAL_CONTEXT_FACTORY,

"com.sap.engine.services.jndi.InitialContextFactoryImpl");

connectionProperties.setProperty(Context.PROVIDER_URL, "<host-name>:<p4-port>");

connectionProperties.setProperty(Context.SECURITY_PRINCIPAL, "<user-name>");

connectionProperties.setProperty(Context.SECURITY_CREDENTIALS, "<password>");

// create the MBeanServerConnection

MBeanServerConnection mbsc = JmxConnectionFactory.getMBeanServerConnection(JmxConnectionFactory.

PROTOCOL_ENGINE_P4, connectionProperties);

I try to get the mbeanserver using the ctx.lookup("jmx");

in a servlet, But after a long run (about one day), the exception still be thrown.

How can i solve this problem, Is it a bug of WebAs?

Thanks and hope somebody reply it.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I suppose what happens is that the security session expires. Default session expiration period is 27 hours.

To check whether this is the case you can try to increase the SessionExpirationPeriod property of security service.

However if this is the problem, it will be no resolution as you will be keeping a big ammount of sessions.

I hope this helps.

Greetings, Myriana