|
|
Re: StringIndexOutOfBoundsException is caught when modifying any .aj file [message #714601 is a reply to message #714483] |
Thu, 11 August 2011 03:29 |
P Messages: 3 Registered: August 2011 |
Junior Member |
|
|
Thanks for your reply, Andrew.
Sorry, I don't know how to provide the real sample codes because it is a bit complex. But, let me describe what the nature of my project is. In addition, I will do my best to give you some refined sample codes for description.
My project is a combination of JEE and Flex project. FlashBuilder plugin is installed in my Eclipse as well. Here is the hierarchy of my workspace.
myproject-ear: Enterprise Application Project
myproject-ejb: EJB Project
myproject-lib: Java Project
myproject-repo: A respository for Java and Flex
myproject-flex-lib: Flex Project
myproject-web: Java Web Project
myproject-ejb is the area that AspectJ is injected. A EJB instantiates a POJO class in order to perform its relevant operation. A pointcut is written for that POJO class. Let me give a simple sample.
MyPojoClass.java
public class MyPojoSample {
public MyPojoSample() {
}
public void start() {
// codes
}
}
MySampleBean.java
@Stateless
@EJB
public class MySampleBean implements MySampleLocal {
public void start() {
new MyPojoSample().start();
}
}
A simple aspect is written for MyPojoSample which contains a pointcut and its corresponding before(..) and after(..) advices.
MySampleAspect.aj
public aspect MySampleAspect {
pointcut start(MyPojoSample pojo):
call(public void MyPojoSample.start(..)) && target(pojo);
before(MyPojoSample pojo): start(pojo) {
// codes
}
after (MyPojoSample pojo): start(pojo) {
// codes
}
}
As you can see, there is nothing special for my codes. Originally, I thought the problem was about the FlashBuilder plugin. However, as I said before, it worked fine in Eclipse 3.5.1.
Did I give you enough clue? If not, please let me know what you need. Anyway, let me say thank you once again.
P.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03363 seconds