[Design the new POJO MicroContainer] - Re: Scoped beans deployment
by alesj
"adrian(a)jboss.org" wrote : Although I think a more general notion would come out of the work
| we need to do to define scoped metadata, probably by annotating the
| deployment or bean?
|
I think it's better if we go from the start into the direction of annotation support.
"adrian(a)jboss.org" wrote :
| That is what I meant before when I said:
| "Although I think a more general notion would come out of the work
| we need to do to define scoped metadata".
|
| The repository exists with all the plumbing, but there is nothing to fill it! :-)
If we/you can get some (semi) clear picture where and how we want this plumbing to happen, I can go and code some initial ideas - so that we can see what fits us best. And I can test this with our OSGi project (as previously mentioned requirement).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009088#4009088
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009088
17 years, 11 months
[Design of POJO Server] - Not keeping track of deployment class loader
by scott.stark@jboss.org
I finally looked into a shutdown error I have been seeing with the repository based profile service. There is a CNFE thrown from the deployers/profileservice-beans.xml ProxyFactory due to the incorrect TCL:
| 14:12:48,161 WARN [StartStopLifecycleAction] Error during stop for ProfileServiceProxyFactory
| javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.<init>(InitialContext.java:175)
| at org.jboss.profileservice.remoting.ProxyFactory.stop(ProxyFactory.java:150)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
| at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
| at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
| at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:167)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstallAction(KernelControllerContextAction.java:243)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.uninstall(KernelControllerContextAction.java:180)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
| at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:240)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:723)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:685)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:615)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:663)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:615)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:663)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:325)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:190)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
| at org.jboss.system.ServiceController.stop(ServiceController.java:481)
| at org.jboss.system.deployers.ServiceDeployer.stop(ServiceDeployer.java:149)
| at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:129)
| at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:46)
| at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.undeploy(AbstractSimpleRealDeployer.java:64)
| at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.prepareUndeploy(AbstractSimpleDeployer.java:42)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
| at org.jboss.profileservice.aop.DeployerAspects.prepareUndeploy(DeployerAspects.java:203)
| at org.jboss.profileservice.aop.DeployerAspects.invoke(DeployerAspects.java:100)
| at org.jboss.aop.advice.org.jboss.profileservice.aop.DeployerAspects_z_invoke_1601866242.invoke(DeployerAspects_z_invoke_1601866242.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at AOPContainerProxy$8.prepareUndeploy(AOPContainerProxy$8.java)
| at org.jboss.deployers.plugins.deployer.DeployerWrapper.prepareUndeploy(DeployerWrapper.java:130)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.prepareUndeploy(MainDeployerImpl.java:517)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.prepareUndeploy(MainDeployerImpl.java:526)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:448)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:406)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.shutdown(MainDeployerImpl.java:634)
| at AOPContainerProxy$6.shutdown(AOPContainerProxy$6.java)
| at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:767)
| at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:749)
| at org.jboss.system.server.profileservice.ServerImpl$ShutdownHook.run(ServerImpl.java:716)
| Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:242)
| at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
| ... 53 more
|
On startup we have a hack in the ProfileServiceBootstrap to take the first bootstrap DeploymentContext as the base TCL. I suppose the ShutdownHook should be going through the profile service to shutdown the deployments in phases and employ the same hack, but shouldn't there be an association in the ControllerContext to the install action class loader if it came from the TCL rather than the BeanMetaData?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009075#4009075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009075
17 years, 11 months
[Design the new POJO MicroContainer] - Re: Registering a bean as an aspect in the bootstrap
by scott.stark@jboss.org
I'm also having problems with the bootstrap xml intercepting some classes. For example, if I add an org.jboss.deployers.spi.attachments.Attachments interceptor:
| <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
| <constructor>
| <parameter><![CDATA[
| <aop>
| <aspect name="deployers" class="org.jboss.profileservice.aop.DeployerAspects"/>
| <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployer.Deployer}->*(..))">
| <advice name="invoke" aspect="deployers"/>
| </bind>
| <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
| <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
| <advice name="process" aspect="mainDeployer"/>
| </bind>
| <aspect name="track" class="org.jboss.profileservice.aop.TrackingAdvice"/>
| <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.attachments.Attachments}->addAttachment(..))">
| <advice name="invoke" aspect="track"/>
| </bind>
| </aop>]]>
| </parameter>
| </constructor>
|
|
This is not applied. I had to go into one particular usage context (AbstractDeploymentContext) and wrap the Attachments instance I wanted to inercept in an aop proxy in order for the above aspect to be applied.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008988#4008988
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008988
17 years, 11 months