-
1. Re: Interceptor bindings on manually installed beans
jharting Jun 6, 2013 2:12 AM (in response to meetoblivion)Which beans.xml? For this to work you would need to enable the interceptor in the same archive FooManager belongs to which may not be possible. This is much simpler with Weld 2.0
-
2. Re: Interceptor bindings on manually installed beans
meetoblivion Jun 6, 2013 8:57 AM (in response to jharting)Jozef,
It's in both beans.xml currently. I also added the interceptor annotation on both the interface and implementation, no luck. This is what my interceptor binding looks like:
@InterceptorBinding
@Target({ TYPE, METHOD })
@Retention(RUNTIME)
@Documented
public @interface PrincipalHasRoles {
@Nonbinding
String[] value() default {};
}
-
3. Re: Interceptor bindings on manually installed beans
jharting Jun 6, 2013 9:06 AM (in response to meetoblivion)What version of JBoss AS is that? Since a certain version of JBoss AS a jboss module with beans.xml should be picked up as a bean archive, thus it would not be necessary to register FooManager programatically any longer and interceptor would work.
-
4. Re: Interceptor bindings on manually installed beans
meetoblivion Jun 6, 2013 9:07 AM (in response to jharting)I'm using JBoss 7.1.1
If this is something that may work fine in 7.2/EAP 6.1 I'm all eyes.
-
5. Re: Interceptor bindings on manually installed beans
jharting Jun 6, 2013 9:36 AM (in response to meetoblivion)Yes I think EAP 6.1 will pick the jboss module with beans.xml as a bean archive. Therefore, you won't need to register FooManager via extension and therefore the interceptor enabled in beans.xml should be applied. Let me know if the assumption is correct.
-
6. Re: Interceptor bindings on manually installed beans
meetoblivion Jun 6, 2013 9:37 AM (in response to meetoblivion)So, upgrading to EAP 6.1 didn't work. Same result.
I may have described it a little off. All of my modules are sitting in the deployments folder. Is it possible to put my JARs into modules, even if they include things like JPA or EJBs?
-
7. Re: Interceptor bindings on manually installed beans
jharting Jun 6, 2013 9:41 AM (in response to meetoblivion)Why do you register FooManager via an extension, then?
-
8. Re: Interceptor bindings on manually installed beans
meetoblivion Jun 6, 2013 9:42 AM (in response to jharting)Since it's cross different deployment modules, it's not considered part of the web archive's deployment module. The work around includes listing the deployment in jboss-deployment-structure.xml and then using an extension to register it from one archive to another.
-
9. Re: Interceptor bindings on manually installed beans
meetoblivion Jun 6, 2013 10:54 AM (in response to meetoblivion)Ok, I created a small module. I put it into the modules directory and marked it as a dependency in jboss-deployment-structure.xml
I put a standard beans.xml in the archive.
I added a dep in my WAR file to this archive in the modules.
However, I ended up getting an unsatisfied dependency exception, so it looks this doesn't work as described.