Echo3 and JBoss

Hi,
I would like to use jboss as application server.
For now, I can developp and deploy an application in the web container of jboss.
But how can I reach the ejb container?
Do I have to create XmlHttpRequests ?
If I try to connect to an ejb, for instance, in a ActionListener handler, it does not work... why?
Does someone use jboss with ejb's as business layer?

Thanks for you advises.

ps: Echo3 is great! Just continue!

You will most likely have to

You will most likely have to configure the EJB's you want to access for the primary servlet for your application. Other than that, you should be able to directly perform JNDI lookup's etc and access the EJB's from your listener code just as you would from any other web application interface.

Invoking EJB shouldn't

Invoking EJB shouldn't depend what UI framework you are using. Just lookup the EJB using your Service Locator or use Spring (Check the spring manual) to do that. You should be able to lookup and invoke EJB from anywhere in your web application including action listeners.

Just need to take care of the deployment part carefully, so you have home, remote interfaces available in web server classloader as well, in case if you are using EJB2. Also any common structure or exception classes which are passed back from EJB should also be available in web server class loader.

You don't need to create XmlHttpRequest as they are only required to interact with the server from the browser.

If it still doesn't work, check and post your error logs.

Regards,
Pawan

sgodden's picture

Do you need EJBs?

Is there any particular reason you are using EJBs?

I used EJBs for years, and my whole experience was that they just made it harder to develop and deploy my application, and harder to port it between app servers.

I haven't used them for 2 years now - my apps are just web apps with a sensible architecture, driven by a DI framework. And my apps are easier to develop and more scalable than ever.