[JBoss-dev] AbstractKernelController behavior inconsistent

Adrian Brock adrian_brock at jboss.org
Wed Aug 23 12:40:10 EDT 2006


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:1369)
> 
>         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





More information about the jboss-development mailing list