[JBoss-dev] AbstractKernelController behavior inconsistent

Anil Saldhana anil.saldhana at jboss.com
Wed Aug 23 12:14:48 EDT 2006


Should ServiceProxy be serializable?

 

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?)

 

 

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)

 

 

________________________________

From: jboss-development-bounces at lists.jboss.org
[mailto:jboss-development-bounces at lists.jboss.org] On Behalf Of Scott M
Stark
Sent: Wednesday, August 23, 2006 8:32 AM
To: JBoss.org development list
Subject: Re: [JBoss-dev] AbstractKernelController behavior inconsistent

 

The question is which constructs should be working and which should not.
I have added a testErrorInContainedStartRedeployAfterError to the
org.jboss.test.system.controller.lifecycle.test.LifecycleRedeployAfterEr
rorTest on the MC_VDF_WORK branch, and although this does not show a
problem with being able to redeploy a failed deployment, it does show
that the errors from the lifecycle methods are not being propagated back
to the caller. From the test logging, the ContainedMBeanService is
throwing an error because it did not see the expected error from the
contained SimpleMBean start:

1720 ERROR [AbstractKernelController] Error installing to Start:
name=jboss.test:type=test state=Create mode=Manual
requiredState=Installed
java.lang.Error: Did not see expected ERRORINSTART from:
jboss.test:contained=SimpleMBean,type=test
    at
org.jboss.test.system.controller.support.ContainedMBeanService.startServ
ice(ContainedMBeanService.java:87)
    at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
    at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
    at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Lja
va.lang.Object;)Ljava.lang.Object;(Unknown Source)
    at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;J)L
java.lang.Object;(Unknown Source)
    at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
    at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    at
org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:16
7)
    at $Proxy0.start()V(Unknown Source)
    at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(S
tartStopLifecycleAction.java:42)
    at
org.jboss.system.microcontainer.ServiceControllerContextAction.install(S
erviceControllerContextAction.java:46)
    at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(Ab
stractControllerContextActions.java:51)
    at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractC
ontrollerContext.java:226)
    at
org.jboss.system.microcontainer.ServiceControllerContext.install(Service
ControllerContext.java:198)
    at
org.jboss.dependency.plugins.AbstractController.install(AbstractControll
er.java:596)
    at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractC
ontroller.java:346)
    at
org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstract
Controller.java:438)
    at
org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstract
Controller.java:379)
    at
org.jboss.dependency.plugins.AbstractController.change(AbstractControlle
r.java:263)
    at
org.jboss.dependency.plugins.AbstractController.change(AbstractControlle
r.java:164)
    at
org.jboss.system.ServiceController.doChange(ServiceController.java:632)
    at
org.jboss.system.ServiceController.start(ServiceController.java:407)
    at
org.jboss.test.system.controller.SimpleSARDeployer.start(SimpleSARDeploy
er.java:131)
    at
org.jboss.test.system.controller.SimpleSARDeployer.deploy(SimpleSARDeplo
yer.java:86)
    at
org.jboss.test.system.controller.ControllerTestDelegate.deploy(Controlle
rTestDelegate.java:176)
    at
org.jboss.test.system.controller.ControllerTestDelegate.assertDeployFail
ure(ControllerTestDelegate.java:227)

This is the first change in behavior that is breaking Anil's example.

Adrian Brock wrote: 

On Wed, 2006-08-23 at 09:53 -0500, Anil Saldhana wrote:
  

	http://www.jboss.com/index.html?module=bb&op=viewtopic&t=89066
	 
	What about getting the ServiceController to get out of the Error
state
	and undeploy the service when asked to?
	    

 
It already does when you undeploy, I have a test for just that.
Unless you have a test that shows otherwise.
  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-development/attachments/20060823/1ac6bdcf/attachment.html 


More information about the jboss-development mailing list