<?xml version="1.0"?>
<faqs>
    <super id="faq">FAQ</super>
    <super id="faq_servlets">Servlets</super>
    <name>Servlets - Tomcat, Resin, etc.</name>
<faq>
<question>Can I use OpenEJB from Tomcat?</question>
<answer id="tomcat">
<p>
Sure you can, it's pretty easy in fact.  You can find <a 
href="tomcat-setup.html">setup instructions here</a>
</p> 
</answer>
</faq>

<faq>
<question>Can I use OpenEJB from Resin?</question>
<answer id="tomcat">
<p>
It's been done, but so far no users have posted the relevant 
details.  If you have any information on it, please post them to the 
<a href="lists.html#openejb-user">OpenEJB user list.</a> 
</p> 
</answer>
</faq>

<faq>
<question>Can I use OpenEJB from Jetty?</question>
<answer id="tomcat">
<p>
We have this information from our Australian friend <a 
href="Michael.Mihaljevic@justice.vic.gov.au">Michael Mihaljevic</a> who 
reports his team uses OpenEJB with Jetty for development, giving them a 
full local environment that allows them to debug their Servlets and EJBs 
end-to-end.</p> 
<p>
Here is what he had to say:
<file>
Our development team has put in place local Servlet and EJB containers 
that can be run and debugged from the servlet code to EJB code within an 
IDE environment ( we are using JDeveloper 3.2.3).

We are using:
- Jetty 4.0.5
- OpenEJB 0.8.1 (using IntraJVM)
- JVM 1.2.2 (from JDeveloper)

Initially when we attempted to setup the Jetty / OpenEJB dev environment, 
we were getting errors when executing servlet code that was narrowing or 
casting the Object returned from the JNDI lookup of an EJB.  A suggestion 
from the OpenEJB Forum (thanks Jacek) indicated it may be a classloader 
problem.  In the end it was a problem in the Jetty code.  It allows for a 
classpath to be specified for a HttpContext object that pointed at the 
servlet classes.  Removing this line of code from the Jetty Server 
resolved the EJB lookup problem.

I've included a sample JettyServer.java source that simply creates a Jetty 
HttpServer.

<a href="JettyServer.java">(See attached file: JettyServer.java)</a>

When running this code, the classpath should include:
- OpenEJB libraries
- Jetty libraries
- EJB component code
- Servlet component code.

I haven't included sample servlet and ejb code, but this is relatively 
straightforward.  The OpenEJB components are used in IntraJVM mode. Once 
all this is setup, its possible to run and debug both servlet and ejb code 
end to end.

This configuration has helped provided our team with a useful local dev 
environment.

Cheers,

Michael Mihaljevic
</file>
</p>
</answer> 
</faq>
       
       
</faqs>
