You should use programmatic lookup, creating an instance method is a neat way to do that.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094922#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...