[JBoss-dev] AbstractKernelController behavior inconsistent

Anil Saldhana anil.saldhana at jboss.com
Wed Aug 23 13:58:34 EDT 2006


Can I set an attribute on a JMX service that has been created but failed
to start (ServiceContext state is FAILED)?

-----Original Message-----
From: Anil Saldhana 
Sent: Wednesday, August 23, 2006 12:18 PM
To: Anil Saldhana; JBoss.org development list
Subject: RE: [JBoss-dev] AbstractKernelController behavior inconsistent

Sorry.  I can make ServiceProxy transient myself.  I thought it was in
the mc code.

I will make the fix and check the updated testcase.

-----Original Message-----
From: Anil Saldhana 
Sent: Wednesday, August 23, 2006 12:16 PM
To: 'JBoss.org development list'
Subject: RE: [JBoss-dev] AbstractKernelController behavior inconsistent

I can check in the updated test case once the ServiceProxy is made
transient. Can you make the fix?

-----Original Message-----
From: jboss-development-bounces at lists.jboss.org
[mailto:jboss-development-bounces at lists.jboss.org] On Behalf Of Adrian
Brock
Sent: Wednesday, August 23, 2006 11:40 AM
To: JBoss.org development list
Subject: RE: [JBoss-dev] AbstractKernelController behavior inconsistent

On Wed, 2006-08-23 at 11:14 -0500, Anil Saldhana wrote:
> Should ServiceProxy be serializable?
> 

No, the old one wasn't either, since it holds a link to the
MBeanServer (via the ServiceController) 
not an MBeanServerConnection (remote version).

The ServiceContext should be, so the ServiceProxy
inside it should be transient. i.e. not part of the
serialized form. 

But this looks like a bug that has been there forever.

>  
> 
> Caused by: java.io.NotSerializableException:
> org.jboss.system.microcontainer.ServiceProxy
> 
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> 
>         at
>
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13
69)
> 
>         at
>
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> 
>  
> 
> for:
> 
> ServiceControllerMBean scmb = (ServiceControllerMBean)
> 
>           MBeanServerInvocationHandler.newProxyInstance(server,
> ServiceControllerMBean.OBJECT_NAME,
> 
>                 ServiceControllerMBean.class, false);
> 
>  
> 
> and also for:
> 
> ServiceContext sc = (ServiceContext)server.invoke(so,
> "getServiceContext",new Object[]{serviceOName}, 
> 
>               new String[]{"javax.management.ObjectName"});
> 
>  
> 
> Why cannot ServiceContext be an attribute on the
> ServiceControllerMBean(feature request?)
> 

How can it be an attribute, it takes a parameter?

>  
> 
>  
> 
> Basically, when the ServiceController has entered the Error state for
> a service, then I get the state of the service (after
> unregister->create->start) is the state "REGISTERED" (instead of
> Started)
> 

I don't understand this? You cannot transistion from
unregistered to create. Once it is unregistered it doesn't exist.

Provide a complete example so we don't have to guess what you
talking about.
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxx


_______________________________________________
jboss-development mailing list
jboss-development at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development




More information about the jboss-development mailing list