[jboss-dev-forums] [Design of POJO Server] - Re: Integrating aop-mc-int bean metadata with AS5

kabir.khan@jboss.com do-not-reply at jboss.com
Thu Aug 14 12:04:36 EDT 2008


I have worked through the issues above, but have reached the final hurdle with my new scope tests. I am deploying the following in a deployment using classloader scoping

  | <?xml version="1.0" encoding="UTF-8"?>
  | <deployment xmlns="urn:jboss:bean-deployer:2.0">
  | 
  |    <interceptor xmlns="urn:jboss:aop-beans:1.0"
  |                name="ScopedInterceptor"
  |              class="org.jboss.test.aop.scopeddependency.ScopedInterceptor">
  |    </interceptor>
  | 
  |    <bind xmlns="urn:jboss:aop-beans:1.0" 
  |          pointcut="execution(* org.jboss.test.aop.scopeddependency.ScopedTester->*(..))">
  |       <interceptor-ref name="ScopedInterceptor"/>
  |    </bind>
  | 
  |    <bean name="ScopedTester" class="org.jboss.test.aop.scopeddependency.ScopedTester"/>
  | 
  | </deployment>
  | 

The aop beans from interceptor and bind get deployed into a scoped controller. The ScopedTester gets deployed into the main controller, and gets a dependency on Factory$ScopedInterceptor from the binding. However, ScopedTester is deployed in the main controller and cannot see Factory$ScopedInterceptor since that is deployed in the scoped controller, which gives this exception:

  | org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
  | 
  | *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
  | 
  | ScopedTester
  |  -> Factory$ScopedInterceptor{Instantiated:** NOT FOUND Depends on 'Factory$ScopedInterceptor' **}
  | 
  | 
  | *** CONTEXTS IN ERROR: Name -> Error
  | 
  | Factory$ScopedInterceptor -> ** NOT FOUND Depends on 'Factory$ScopedInterceptor' **
  | 

As mentioned I am deploying all the aop beans myself and ripping them out of the deployment. A solution would be to handle all beans in a deployment myself if it is scoped and contains some aop beans, but that feels a bit hacky to me? Alternatively, would it be possible to place the annotation causing a scoped controller on all the beans in the deployment if it is scoped and contains some aop beans? I don't know how I would determine that the deployment is scoped and contains some aop beans though if the aop stuff is in an -aop.xml and the other beans in a -beans.xml?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170606#4170606

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170606



More information about the jboss-dev-forums mailing list