Thanks a lot for your mail Daniel
I am using ear deployment (my ear file contains web war, ejb jar,
META-INF with application.xml)
I did read through J2eeDeployment_howto.html and tomcat example.
It gave me good information, however I was not able to find how to
make the reference the ejb classes from jboss-jetty servlet engine.
Could you please clarify a little bit your text:
<in the web archives manifest/Classpath section.>
from your mail answer
>In case of .ear file you must reference the package with the remote
>interfaces (wether the ejb package itself -> ugly; or a separate package
>containing the Remote stuff, which you use for yor app client too ->
>clean, good) in the web archives manifest/Classpath section.
Do I need to change anything in conf directory, or to add something to
Manifest.mf which is the part of ear file? I didn't change any jboss or
jetty settings, and using all default.
I just created application files (based on downloaded jboss example for
tomcat and
your explainations in mentioned link) outside of jboss_jetty directory and
copied
ear file into deploy dir.
Changing system CLASSPATH (before starting server), to include, ejb jar did
not help
(servlet itself could not be resolved then).
Servlet call which fails (same work fine in standalone java) is:
boundObject = context.lookup("InterestApp");
Below are my config files.
Could you please give me a clue to what is wrong here. Thanks heaps. Miomir
application.xml
<?xml version="1.0"?>
<application>
<display-name>Hello (Sample Application)</display-name>
<module>
<ejb>Interest-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>Interest-web.war</web-uri>
<context-root>/servlets</context-root>
</web>
</module>
</application>
web.xml
<?xml version="1.0"?>
<web-app>
<display-name>Interest Application</display-name>
<servlet>
<servlet-name>com.web_tomorrow.InterestServlet</servlet-name>
<description>Servlet that calls the Hello bean</description>
<servlet-class>com.web_tomorrow.InterestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>com.web_tomorrow.InterestServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
<?xml version="1.0"?>
<ejb-jar>
<description>Interest Application</description>
<display-name>Interest Application</display-name>
<enterprise-beans>
<session>
<ejb-name>InterestApp</ejb-name>
<home>com.web_tomorrow.InterestHome</home>
<remote>com.web_tomorrow.Interest</remote>
<ejb-class>com.web_tomorrow.InterestoBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
-----Original Message-----
From: Daniel Schulze [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 27, 2000 9:04 AM
To: jBoss
Subject: Re: [jBoss-User] HELP: EJB resolve by servlet
Hi,
Seems the ServletContainer doesnt have the Home/Remote interfaces of
your beans in its classpath.
Do you use an ear file for your app or do you deploy your ejb package
separate from the web package?
In case of .ear file you must reference the package with the remote
interfaces (wether the ejb package itself -> ugly; or a separate package
containing the Remote stuff, which you use for yor app client too ->
clean, good) in the web archives manifest/Classpath section.
Did you read the Deployment howto at:
http://www.jboss.org/documentation/J2eeDeployment_howto.html
In case of separate deployed packages you need the remote classes in
your web archive (WEB-INF/lib or WEB-INF/classes) but in this case you
can not make use of the optimized inVM method invocation.
HTH
\Daniel
[EMAIL PROTECTED] wrote:
>
> Hello
> New jboss_jetty server is really great (servlets, JSP work perfectly and
> FAST), but I have
> problems with servlet-ejb communication.
>
> I am using Interest EJB (downloaded with manual and slightly modified for
> jboss_jetty), and it
> works fine with standalone java app, when accessed via servlet (same
code),
> always gives me
> a following exception:
> [Jetty] Unable to get reference to Interest Interface:
> javax.naming.CommunicationException
> [Root exception is java.lang.ClassNotFoundException:
> com.web_tomorrow.interest.InterestHome]
>
> Please, is there any downloadable example or pointer how to make the
> jboss_jetty
> servlet resolve the EJB components, specified via its JAR in the EAR
(which
> also contains WAR) file in a standard way (without having unpacked
classes,
> as in jboss
> manual)
> I found jboss_tomcat example but it is very tomcat specific as it require
> editing of
> classpath for tomcat.bat. Also, specifying ejb jar file in classpath,
before
> starting server,
> does not work for me (jboss-jetty servlet itself could not be resolved
> then).
>
> I tried lot of things without success. Please help! Thanks. Miomir
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]