[JBoss Seam] - Refactoring
by gcowsar
I modified the Seam Messages example to use mySQL.
In the process discovered that "read" as a column name won't work with mySql, their not-so-smart parser has a long list of reserved keywords that can't be used for table or column names, so I changed the name from "read" to "messageRead" and the getter and setter appropriately using the Refactoring in eclipse. No problem so far.
But, the name also has to be changed in the .jsp, and in theory it could be referenced in many .jsp files, and it could be referenced in .js files.
It seems like the refactoring should change it everywhere, not just in .java files.
In the case of this example, it also had to be changed in the import.sql (but this would normally only for a sample).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959740#3959740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959740
19 years, 9 months
[JBoss AOP] - AOP packaging for LoadTime weaving with EAR isolation
by ortimus
We have an issue with loadtime weaving due to EAR isolation.
Our environment is: JBoss 4.0.3 + JBOSS AOP 1.5 GA
Here's the scenario:
We have a jar myaspects.aop with the following structure:
myaspects.aop
com
|__aoptest
|__aspects
| |__ MyException
|__interceptors
| |__MyInterceptor
|__META_INF
|__jboss-aop.xml
MyInterceptor is bound to the MyException constructor
jboss-aop.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <aop>
| <bind pointcut="execution(public com.aoptest.aspects.MyException->new())">
| <interceptor class="com.aoptest.interceptors.JeopardyInterceptor" scope="PER_VM"/>
| </bind>
| </aop>
We have say two EAR's - componentX & componentY - with EAR isolation turned on. Both componentX & componentY include myaspects.aop.
componentXSession is a stateless session bean in componentX
componentYSession is a stateless session bean in componentY
componentXSession has a method fooX
fooX(){
...
throw new com.aoptest.aspects.MyException();
...
}
componentYSession has a method fooY
fooY(){
...
throw new com.aoptest.aspects.MyException();
...
}
If we call componentXSession.fooX or componentYSession.fooY() independently, the intercptor gets invoked correctly for each call.
Now, say componentXSession has a method fooXY
fooXY(){
...
fooX()
...
componentYSession.fooY()
...
}
In this secnario, where we are calling a method on another sessiopn bean (in another EAR) the intercptor doesn't get invoked.
So, from fooXY, MyException created by fooX() gets intercepted, but MyException created by componentYSession.fooY() doesn't get intercepted.
Is this correct behavior with EAR isolation turned on?
If we turn EAR isolation off for both the EARs, this cross-EAR call works (now we have the problem of multiple invocations on each call but that is another issue.)
In our project we have decided to use EAR isolation ON, so we need guidance on how to make this work.
Should I be using a different packaging scheme or configuration that will make this work? Any advice will be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959736#3959736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959736
19 years, 9 months