And a follow-up question: Actually, at this point it seems like beans can't even be used within plain old servlets. Can someone confirm that I can locate resources using JNDI's InitialContext within JBoss? Is this the right way to find resources?
I am totally lost on this. It seems like a huge amount of effort has gone into creating J2EE but the different sides have no "glue" that lets them communicate.
And a final question: Is JBoss being used? From everything I read about it, it is designed to manage information in databases and expose it to clients of various types (web interfaces, Swing applications, etc). But it doesn't seem like there is any way for a front-end component (like a JSP) to ever find any of the EJBs. I can spend a month working on business logic but if it is never visible to the outside world... I'm not sure how to make use of it.
Ok, this is insane. I have spend the last week reading about JBoss and people using it for websites... surely there is some way for view components (JSPs) to display data from the model (EJBs)? Or does everyone have to write his own interface / naming system to do this? If J2EE / JBoss don't have some system to allow communication it would be easier to just use plain old Servlets / JSPs the old way, right?
I looked at the customers section of the JBoss site and it looks like many large companies are using it, I just can't figure out what it is for or how they are using it. Does anyone know?
do you have isolation on?
Look at the EJB3 trailblazer. That is where I got my start using EJB3. It is a very simple lookup on a bean but I would not directly call my bean from a JSF page. I would have a managed bean communicate with a session facade.
Here is a basic lookup:
remoteInterfaceReference = (RemoteInterface) ctx.lookup("ImplementationClass/remote");
I get a reference to the remote interface for the component I am going to make calls on.