I've got a system that is in need of a general interface to call and I've chosen to use SessionBeans to hold my Business Logic. I've built the system and everything has been working yet I'm now getting an error and I don't know why.
Here is what I've got.
6 SessionBeans that each implement some business logic.
1 Servlet that listens to incoming posts and looks up a the session bean it is to call from an MBean that manages a HashMap.
each Session bean has the following
//for this example I'll just use one bean, because they are all the same.
public class LookupServiceSLSBBean extends MySessionBean
//removing the ejbCreate and stuff for readablity
public String processMessage(String myArg)
return "here is what you passed in: " + myArg;
public abstract interface MYLocalHome extends EJBLocalHome
public abstract MYLocalObject create throws CreateException;
public interface LookupServiceSLSBLocalHome extends MYLocalHome
MYLocalObject create() throws CreateException;
public interface LookupServiceSLSBLocal extends MYLocalObject
String processMessage(String myArg) throws EJBException;
public abstract interface MYLocalObject extends EJBLocalObject
public abstract String processMessage(String myArg) throws EJBException;
that it. So in short when the servlet gets a post it looks in the HashMap for some data i.e. postblah returns "ejb/LookupServiceSLSBLocal"
then the servlet gets the LocalHome from jndi and calls the create. (I hope you see where I'm going)
MyLocalHome serviceHome = (MyLocalHome)ic.lookup((String)hashmap.get(request.getParameter("posttype")));
MyLocalObject service = serviceHome.create();
This way I don't have to change any code in the servlet. just update the HashMap via JMX.
the problem is..... the code was working and how it's not. ;)
I'm using JBoss 3.2.1 I'm getting the WARN [verifier] EJB spec violation blah blah.
1) is this totally bogus? Have I missed something?
2) why did it work before if it is bogus?
Hope someone can help.