[JBoss AOP] - Re: Are names supposed to be unique in JBoss AOP?
by flavia.rainone@jboss.com
Hi!
It is expected that JBoss AOP would create four instances of aspects instead of two.
This is true because an interceptor tag declares a new interceptor to JBoss AOP. Whether you have more than one interceptor declaration with the same class is not relevant. Look at the example below:
<bind pointcut="execution(static * POJO->*(..))">
| <interceptor class="MethodInterceptor name="interceptor1"/>
| </bind>
|
| <bind pointcut="execution(* POJO$Bar->*(..))">
| <interceptor class="MethodInterceptor" name="interceptor2"/>
| </bind>
In the xml tags above two different interceptors, with the same class, are declared. Their names are "interceptor1" and "interceptor2". If their names are not defined, JBoss AOP creates a name for those interceptors.
So, if you want to use a single interceptor, i.e., to have only one aspect definition generated to represent your interceptor, you should do something like this:
<interceptor class="MethodInterceptor name="interceptor1"/>
|
| <bind pointcut="execution(static * POJO->*(..))">
| <interceptor-ref name="interceptor1"/>
| </bind>
|
| <bind pointcut="execution(* POJO$Bar->*(..))">
| <interceptor-ref name="interceptor1"/>
| </bind>
However, it looks like JBoss AOP does create two interceptors with the same name when the name attributes are not defined. I will do some investigation before answering this part of your question.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142966#4142966
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142966
18 years
[Clustering/JBoss] - Re: Load balancing and dev environment
by maralcbr
Hi Brian,
Follows the exception:
2008-04-09 16:46:55,783 ERROR [STDERR] [error] @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition}) file:/C:/testes_jboss/hg_jboss-4.2.2.GA_v3_denivaldo/server/node1/tmp/deploy/tmp23824ejb3-interceptors-aop.xml
| 2008-04-09 16:46:55,783 ERROR [STDERR] java.lang.RuntimeException: java.lang.RuntimeException: @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition})
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:892)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deploy(AspectXmlLoader.java:1210)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1236)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.aop.deployment.AspectDeployer.create(AspectDeployer.java:177)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 2008-04-09 16:46:55,783 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| 2008-04-09 16:46:55,798 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 2008-04-09 16:46:55,814 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at $Proxy0.start(Unknown Source)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| 2008-04-09 16:46:55,829 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at $Proxy4.start(Unknown Source)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 2008-04-09 16:46:55,845 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
| 2008-04-09 16:46:55,861 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:508)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
| 2008-04-09 16:46:55,876 ERROR [STDERR] Caused by: java.lang.RuntimeException: @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition})
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.introduction.AnnotationIntroduction.<init>(AnnotationIntroduction.java:98)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.introduction.AnnotationIntroduction.createComplexAnnotationIntroduction(AnnotationIntroduction.java:75)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.loadAnnotationIntroduction(AspectXmlLoader.java:712)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployAnnotationOverride(AspectXmlLoader.java:681)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1058)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployDomain(AspectXmlLoader.java:952)
| 2008-04-09 16:46:55,876 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1066)
| 2008-04-09 16:46:55,892 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:886)
| 2008-04-09 16:46:55,892 ERROR [STDERR] ... 71 more
| 2008-04-09 16:46:55,892 ERROR [STDERR] Caused by: org.jboss.aop.annotation.ast.ParseException: Encountered "{" at line 1, column 140.
| Was expecting one of:
| ")" ...
| "," ...
|
| 2008-04-09 16:46:55,892 ERROR [STDERR] at org.jboss.aop.annotation.ast.AnnotationParser.generateParseException(AnnotationParser.java:700)
| 2008-04-09 16:46:55,892 ERROR [STDERR] at org.jboss.aop.annotation.ast.AnnotationParser.jj_consume_token(AnnotationParser.java:583)
| 2008-04-09 16:46:55,892 ERROR [STDERR] at org.jboss.aop.annotation.ast.AnnotationParser.Annotation(AnnotationParser.java:114)
| 2008-04-09 16:46:55,892 ERROR [STDERR] at org.jboss.aop.annotation.ast.AnnotationParser.Start(AnnotationParser.java:33)
| 2008-04-09 16:46:55,908 ERROR [STDERR] at org.jboss.aop.introduction.AnnotationIntroduction.<init>(AnnotationIntroduction.java:93)
| 2008-04-09 16:46:55,908 ERROR [STDERR] ... 78 more
| 2008-04-09 16:46:55,908 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/testes_jboss/hg_jboss-4.2.2.GA_v3_denivaldo/server/node1/deploy/ejb3-interceptors-aop.xml
| org.jboss.deployment.DeploymentException: java.lang.RuntimeException: @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition}); - nested throwable: (java.lang.RuntimeException: java.lang.RuntimeException: @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition}))
| at org.jboss.aop.deployment.AspectDeployer.create(AspectDeployer.java:185)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.RuntimeException: java.lang.RuntimeException: @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition})
| at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:892)
| at org.jboss.aop.AspectXmlLoader.deploy(AspectXmlLoader.java:1210)
| at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1236)
| at org.jboss.aop.deployment.AspectDeployer.create(AspectDeployer.java:177)
| ... 68 more
| Caused by: java.lang.RuntimeException: @org.jboss.annotation.ejb.Clustered(loadBalancePolicy=org.jboss.ha.framework.interfaces.FirstAvailableIdenticalAllProxies.class,partition=${jboss.partition.name:DefaultPartition})
| at org.jboss.aop.introduction.AnnotationIntroduction.<init>(AnnotationIntroduction.java:98)
| at org.jboss.aop.introduction.AnnotationIntroduction.createComplexAnnotationIntroduction(AnnotationIntroduction.java:75)
| at org.jboss.aop.AspectXmlLoader.loadAnnotationIntroduction(AspectXmlLoader.java:712)
| at org.jboss.aop.AspectXmlLoader.deployAnnotationOverride(AspectXmlLoader.java:681)
| at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1058)
| at org.jboss.aop.AspectXmlLoader.deployDomain(AspectXmlLoader.java:952)
| at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1066)
| at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:886)
| ... 71 more
| Caused by: org.jboss.aop.annotation.ast.ParseException: Encountered "{" at line 1, column 140.
| Was expecting one of:
| ")" ...
| "," ...
|
| at org.jboss.aop.annotation.ast.AnnotationParser.generateParseException(AnnotationParser.java:700)
| at org.jboss.aop.annotation.ast.AnnotationParser.jj_consume_token(AnnotationParser.java:583)
| at org.jboss.aop.annotation.ast.AnnotationParser.Annotation(AnnotationParser.java:114)
| at org.jboss.aop.annotation.ast.AnnotationParser.Start(AnnotationParser.java:33)
| at org.jboss.aop.introduction.AnnotationIntroduction.<init>(AnnotationIntroduction.java:93)
| ... 78 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142963#4142963
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142963
18 years
[JBoss AOP] - Are names supposed to be unique in JBoss AOP?
by Danamin
When closely studying the creation of interceptors, there is a strange thing going on: each time an interceptor, aspect or advice is deployed, a new one is made, even if there already is an identical one in the system.
In the MethodExecution example
| <aop>
| <bind pointcut="execution(public void POJO->noop())">
| <interceptor class="SimpleInterceptor"/>
| </bind>
|
| <bind pointcut="execution(* POJO->*(int))">
| <interceptor class="MethodInterceptor"/>
| </bind>
|
| <bind pointcut="execution(static * POJO->*(..))">
| <interceptor class="MethodInterceptor"/>
| </bind>
|
| <bind pointcut="execution(* POJO$Bar->*(..))">
| <interceptor class="MethodInterceptor"/>
| </bind>
|
| </aop>
|
One would expect there are two aspects with one Interceptor/advice each:
SimpleInterceptor with an invoke advice and
MethodInterceptor with an invoke advice
This example creates 4 aspects with one advice each:
1 SimpleInterceptor with an invoke advice and
3 MethodInterceptors with an invoke advice
This could of course be considered a feature. If it is considered a feature, we loose uniqueness of name for aspects and interceptors.
The only unpleasant side effect is that the interceptorFactories and aspectDefinitions fields in the AspectManager are no longer consistent, because they use name as their key.
I don't have a full view of the consequences of this, but I can list a few
| * debugging information is inconsistent
| * when the second aspect with the same name is deployed, the first one is undeployed, this removes it from all advisors, but it's bindings (and interceptors) remain active, the bindings will continue to create instances of the aspect, which can no longer be centrally undeployed
| * bindings silently replace each other, correctly as far as I can see
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142956#4142956
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142956
18 years
[Persistence, JBoss/CMP, Hibernate, Database] - Referenced datasource not found with JBoss 5.0 (Beta4)
by depryf
Hi,
We are currently using JBoss 4.2.2 but we are trying to make our application work under JBoss 5.0.
We are using a WAR file as well as an EAR file containing our EJB jar file.
We defined our datasource as a JNDI resource in a "-ds.xml" file in the deploy directory; it seems to be correctly deployed both under 4.2.2 and 5.0.
That data source is accessed by our application through a reference that is defined in web.xml:
| <resource-ref>
| <res-ref-name>app-specific/datasource</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <res-auth>Container</res-auth>
| <res-sharing-scope>Shareable</res-sharing-scope>
| </resource-ref>
|
The mapping between the resource reference name and the JNDI name is in our jboss-web.xml file:
| <resource-ref>
| <res-ref-name>app-specific/datasource</res-ref-name>
| <jndi-name>java:/app/datasource</jndi-name>
| </resource-ref>
|
This set-up used to work under JBoss 4.2.2 but doesn't work anymore under JBoss 5.0; it complains that the datasource is not bound:
| Caused by: javax.naming.NameNotFoundException: app-specific not bound
|
I know JBoss 5.0 is still Beta; I was just wondering if anybody else ran into this problem too...
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142945#4142945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142945
18 years
JBoss secure deployment guides? notes you care to share? :)
by katsumi liquer
Hello everyone,
I apologize if any of these questions are duplicates or answered elsewhere
-- I have looked through the archives but not been able to find exactly what
I am looking for.
What I am trying to find is list a list of steps from a RHEL administrator's
point of view to transition a wide-open JBoss server which is being used in
a development environment to a secure server being used in production
deployment.
The things I am most concerned with are to disable the JBoss main homepage,
disable any debug information, disable access to any web apps which we have
not explicitly granted access to, etc. I have found documentations for some
parts, such as removing the jmx console, but I was curious if anyone had a
collection of of steps they commonly use to put JBoss into a secure mode.
I am working on using mod_jk to go in front of tomcat for basic URL
filtering and such, but even still it is not clear from the mod_jk
documentation the optimal way to do this when security is the goal.
Again, I apologize if this is a really weak question, I just want to rule
out the obvious before I dig deeper into all the configs on my own. I have
poured through everything in the JBoss Security wiki, but a lot of that is
from the code level and development perspective; what I am seeking is
basically a straight up RHEL JBoss hardening guide, or the closest possible
analog.
Thank you very much,
katsu
18 years