[Design the new POJO MicroContainer] - Re: Callbacks and new classloader changes
by adrian@jboss.org
If you are seeing ServiceController.shutdown()
then it means there are MBeans not getting undeployed in the proper way,
i.e. uninstalled by the deployment or service that constructed them.
The ServiceController.shutdown() is only really a hack to fix broken stuff
in the case where the JVM is not really shutdown and would cause leaks otherwise.
The same goes for the BasicKernelDeployer.shutdown()
In this case, it looks like the issue is in
system-jmx/src/main/org/jboss/system/microcontainer/jmx/ServiceControllerLifecycleCallback.java
which implements the @JMX handling.
It is only invoking the destroy() on the MBean.
It is not removing the reference from the ServiceController, etc. via remove()
| public void uninstall(ControllerContext context) throws Exception
| {
| JMX jmx = readJmxAnnotation(context);
| ObjectName objectName = createObjectName(context, jmx);
|
| log.debug("Unregistering MBean " + objectName);
| serviceController.destroy(objectName);
| + serviceController.remove(objectName);
| }
|
So the JMXKernel.shutdown() is trying to clean this up and failing.
But rather than just fix this, I want to understand why the callbacks
are being invoked on a context that doesn't exist
(something wrong with dependencies?) and what those
callbacks might be?
I'd have more information if this was a better error message.
Why is there no contextual information?
| // let's make sure we suppress any exceptions
| catch (Throwable t)
| {
| - log.warn("Cannot resolve callbacks.", t);
| + log.warn("Cannot resolve callbacks state=" + state + " isInstall=" + isInstallPhase + + " context="context + , t);
| }
|
| 23:36:28,187 WARN [AbstractKernelController] Cannot resolve callbacks.
| javax.management.InstanceNotFoundException: jboss.jca:service=JCAMetaDataRepository,name=DefaultJCAM
| etaDataRepository is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.getClassLoaderFor(MBeanServerImpl.java:1062)
| at org.jboss.system.microcontainer.ServiceControllerContext.getClassLoader(ServiceController
| Context.java:167)
| at org.jboss.dependency.plugins.SecurityActions.setContextClassLoader(SecurityActions.java:4
| 6)
| at org.jboss.dependency.plugins.AbstractController.resolveCallbacks(AbstractController.java:
| 1174)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:
| 1006)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:
| 936)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:463)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:426)
|
Who, where, what, why, when? :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126672#4126672
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126672
18 years, 2 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: AOP Container Proxy serialization issue
by adrian@jboss.org
"kabir.khan(a)jboss.com" wrote : I have largely implemented this locally. Adrian's test still fails since the MetaDataRetrievalToMetaDataBridge is not serializable
That could never be properly serializable. e.g. the bridge
could link to a MetaDataRetrieval that loads data from a database
or it may link to scopes that depend upon the server or cluster you are running in.
What I don't understand is why the objects in the test have a proxy anyway?
Your point creates another issue.
The mechanism of "serialization" should depend upon the use case.
1) The proxy is for server side aspects and should be removed
when given to the client, i.e. we serialize it as the plain class.
Although this use case doesn't make much sense.
2) The proxy is intended for client side use and should contain a MetaData
object that is serializable and contains the client side metadata
(or knows how to link to it on deserialization).
3) The proxy should be replaced with a client side stub that does remote
requests on the server side object.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126659#4126659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126659
18 years, 2 months