What am I trying to do? I have this EJB3 application. I use TestNG together with the ejb3
embeddable to run some Unit tests on my application. The problem is that I have this JBoss
Service bean that makes a HTTP call (very simple) to a web address. I also want to test
this bit of code, but without the HTTP call being made. I want some elegant way to get
this done.
What I want to do is to replace the HTTPClient (that makes the http call) with a Mock
object. This mock object simply returns the value that I expect. I was thinking that AOP
could be de the elegant solution for me. I am new to AOP so maybe I am seeing this
completely wrong.
The problem is that I am having problems getting AOP to work within the Embeddable JBoss.
I created a META-INF/jboss-aop.xml file and I am sure that it got loaded, because it
throws exceptions if I do something wrong within the file. But as soon as the AOP should
spring into action and call an Interceptor class nothing happens.
Does someone else have any expierence with AOP and EJB3 Embeddable?
Before I start posting examples, I would want to know that what I am trying is possible.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042542#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...