If it's just one webapp using these 5/6 ejbs, than I highly recommend the collapsed ear approach with your Tomcat 5.0.x. I tested that out with 5.0.28 just now and it works great. I also took the setup commands I typed just now and threw them into a doc:

  http://openejb.org/Collapsed+EAR+on+Linux

Sure is nice having a wiki-powered website!

If you are more looking to have serveral webapps sharing the same ejbs in a more traditional ear fashion as we do with 0.9.x and up, then let me know and I'll run the setup on my machine with 1.0 beta1 and post the commands to the wiki.

A lot of people had issues with 0.9.0. Most of them were fixed in 0.9.1 and pretty much all were fixed in 0.9.2. The documentation on the website is part-way upgraded to reflect 1.0 beta1 which includes some new things you can't do in previous versions, so it's a little confusing. There is documentation inside the 0.9.2 release which is pretty good.

Let me know.

Thanks,
David

On Sep 9, 2005, at 11:59 AM, Rajesh Puri wrote:

This is for a big organization in Washington DC. We
are Tomcat based JSP shop. But I have some application
for which I am prototyping this, as we
want to move away from Jdeveloper . This application
will have not many EJB's - like 5/6 kind of small to
try new directions. I used before Jasper report
another open source like this and worked great moving
away from expensive Business Object.


Well, I guess my prob is documentation I have seen
assumes certain things(what are those?). I did exactly
as given on Onjava link for Hello world and I get the
big error log. Obviously, someting to do with env etc.
--- David Blevins <[EMAIL PROTECTED]> wrote:


Wow, we've fixed all sorts of things since 0.9.0.  I
wonder if I
could at least get you to go up to 0.9.2 and see if
we cant get that
running for you.

Out of curiosity, how many webapps and ejb-jars do
you plan to run
once everything is setup?  You may be better off
with the Collapsed
EAR technique as opposed to the global integration
approach depending
on how you plan to organize your apps.

-David

On Sep 9, 2005, at 6:37 AM, Rajesh Puri wrote:


I was doing hello world per following link:




http://www.onjava.com/pub/a/onjava/2003/02/12/ejb_tomcat.html?page=2


I am running Tomcat 5.0 with OpenEjb 0.9.0. In
addition to what is given I did following:

1) Started OPENEJB after deploy of example. It

seems

the beans got loaded.
2) Changed server.xml with following insert in
<GlobalNamingResources> section.

<Ejb name="ejb/hello"
    type="Session"
    home="org.acme.HelloHome"
    remote="org.acme.Hello"/>
<ResourceParams name="ejb/hello">
    <parameter>
        <name>factory</name>

<value>org.openejb.client.TomcatEjbFactory</value>
    </parameter>
    <parameter>


<name>openejb.naming.factory.initial</name>






<value>org.openejb.client.LocalInitialContextFactory</value>

    </parameter>
    <parameter>


<name>openejb.naming.security.principal</name>

        <value>username</value>
    </parameter>
    <parameter>

<name>openejb.naming.security.credentials</name>
        <value>password</value>
    </parameter>
    <parameter>
        <name>openejb.naming.provider.url</name>
        <value>localhost:4201</value>
    </parameter>
    <parameter>
        <name>openejb.ejb-link</name>
        <value>Hello</value>
    </parameter>
</ResourceParams
3) Copied jar files from /dist of openejb folder

to

common/lib in tomcat. Not sure if that was needed.

My

guess was that tomcat should be able to see all
jars(including my bin jar for jsp to import).
4) Copied my test page to jsp-examples.
5) Copied openejb_loader-0.9.0.war  to webapps.

Restarted tomcat.

I get the following errors in console. I also

tried to

copy j2ee.jar in common/lib that also did not

help.

I see the openejbloader page that does not show

that

hello bean as being loaded or anything.

Obviously I am not missing some piece here. My
understanding was that if I have deployed bean in
OpenEjb and it is up and running, all I need to do

was

change server.xml and copy my jsp and that should

work

- do I need to modufy tomcat classpath etc also, i
have default settings for tomcat. I really did not
have to do steps 3 & 4. But that also did not

work.



Another Question - I believe that currently I am
running as two seperate JVM's(openejb needs to be
started seperately then Tomcat - this is the

default

mode?), but will like to run really needs just as

a

container in Tomcat. What doi I need to change

this.


I have spent 2 days figuring it out and at the

point

of giving it up. Obviously, I lack the knowledge

on

this. My interest is to run this as add on to
Tomcat.This seems to be a nice container to use

with

Tomcat - but my bad.





------------------------------------------------------

2005-09-09 09:14:12 StandardWrapperValve[jsp]:
Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name ejb is

not

bound in this Context
    at




org.apache.naming.NamingContext.lookup(NamingContext.java:768)

    at




org.apache.naming.NamingContext.lookup(NamingContext.java:138)

    at




org.apache.naming.NamingContext.lookup(NamingContext.java:779)

    at




org.apache.naming.NamingContext.lookup(NamingContext.java:138)

    at




org.apache.naming.NamingContext.lookup(NamingContext.java:779)

    at




org.apache.naming.NamingContext.lookup(NamingContext.java:151)

    at




org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)

    at javax.naming.InitialContext.lookup(Unknown

Source)

    at




org.apache.jsp.testejb_jsp._jspService(testejb_jsp.java:58)

    at




org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

    at




javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    at


org.apache.jasper.servlet.JspServletWrapper.service

(JspServletWrapper.java:324)
    at




org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:



292)
    at




org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

    at




javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    at




org.apache.catalina.core.ApplicationFilterChain.internalDoFilter



(ApplicationFilterChain.java:237)
    at




org.apache.catalina.core.ApplicationFilterChain.doFilter



(ApplicationFilterChain.java:157)
    at


org.apache.catalina.core.StandardWrapperValve.invoke


(StandardWrapperValve.java:214)
    at




org.apache.catalina.core.StandardValveContext.invokeNext



(StandardValveContext.java:104)
    at
org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
    at




org.apache.catalina.core.StandardContextValve.invokeInternal



(StandardContextValve.java:198)
    at


org.apache.catalina.core.StandardContextValve.invoke



=== message truncated ===





______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/



Reply via email to