Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

Where to download an ejb3 app already packaged/deployed

View: New views
8 Messages — Rating Filter:   Alert me  

Where to download an ejb3 app already packaged/deployed

by Antonio Fornié :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

Some months ago I started working with Geronimo but it was so difficult that I finally gave up I try other alternatives. Now I want to give it a try once again, but I'm finding a little bit difficult to put some basic sample running.

First of all I don't know the file structure for a simple app with a couple of EJBs and a servlet using them. Is there any place to look for it?

What I would really like is to download a folder with the app inside not having to package it with maven. Only to make an inplace deploy. Is there anything available out there? Otherwise, where to find the app structure?

Thank you very much.

Antonio

Re: Where to download an ejb3 app already packaged/deployed

by Quintin Beukes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, most of the information on packaging is available on the
Geronimo docs. I must say that my startup experiences with Geronimo
was also very difficult, and the docs aren't very easy to navigate.
It's well indexed, but not always clear where to look. Geronimo is
also not very intuitive and "user friendly", though once you get to
know it, it's brilliant. Took met about a week or so to get
comfortable with it, and I doubt I'll turn to another server anytime
soon. Especially given the quick turnaround on bug reports.

Either way, what you can try is to use your IDE to make the EJB jar
for you. Which IDE are you using? I prefer Netbeans, though I would
probably recommend Eclipse is better for a new Geronimo+JavaEE user.

Also checkout the IBM redbook for WASCE. It's not Geronimo per se,
though very close to it and has good thorough information on doing
JavaEE with WASCE. For the more technical bits there is always the
mailing list and online documentation.

You can find the redbook here:
http://www.redbooks.ibm.com/redpieces/abstracts/sg247639.html?Open&S_TACT=105AGX10&S_CMP=WASCE
And the Geronimo 2.1 docs here: http://cwiki.apache.org/GMOxDOC21/

From the Geronimo docs, I recommend checking out these tutorials as
well: http://cwiki.apache.org/GMOxDOC21/tutorials.html

And when you have the time, invest in slowly browsing through the
Geronimo documentation. There is really a lot documented there, and
the listings are of good quality and ever improving (compare 2.1 to
2.2 docs) and I've found it very useful to get a good "impression" on
where to find things.

Quintin Beukes



On Thu, Oct 8, 2009 at 12:38 PM, Antonio Fornié
<sitaronocturnal@...> wrote:

>
> Hello!
>
> Some months ago I started working with Geronimo but it was so difficult that
> I finally gave up I try other alternatives. Now I want to give it a try once
> again, but I'm finding a little bit difficult to put some basic sample
> running.
>
> First of all I don't know the file structure for a simple app with a couple
> of EJBs and a servlet using them. Is there any place to look for it?
>
> What I would really like is to download a folder with the app inside not
> having to package it with maven. Only to make an inplace deploy. Is there
> anything available out there? Otherwise, where to find the app structure?
>
> Thank you very much.
>
> Antonio
> --
> View this message in context: http://www.nabble.com/Where-to-download-an-ejb3-app-already-packaged-deployed-tp25801685s134p25801685.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Re: Where to download an ejb3 app already packaged/deployed

by Antonio Fornié :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much.

I'm sure Geronimo has to be wonderfull. In fact I really like Tomcat and OpenEJB, but using Geronimo has been always hard. I hope now longer with people like you helping :)

Believe me I found a lot of info I tried to use, but after having so many problems I just wanted to know the basic structure of an application already deployed. It's nowhere, is it?

Yes, I will try to work with Eclipse, my favorite IDE, but last time I tried I had so many problems and now that I try again I read that people is having problems with Galileo... so before IDE integration, I was going to try a really simple sample app (so simple not to need IDE integration at all, though I would code with Eclipse I would deploy by hand). I think that a project with 2 or 3 java files, and 2 or 3 xml files should not be difficult even without IDE.

By the way, you have work with Geronimo. Is now easy for you to work with JMS, Stateful and stateless, interceptor...? Does it work fine?

Thank you very much.


Re: Where to download an ejb3 app already packaged/deployed

by Quintin Beukes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Yes, I will try to work with Eclipse, my favorite IDE, but last time I tried
> I had so many problems and now that I try again I read that people is having
> problems with Galileo... so before IDE integration, I was going to try a
> really simple sample app (so simple not to need IDE integration at all,
> though I would code with Eclipse I would deploy by hand). I think that a
> project with 2 or 3 java files, and 2 or 3 xml files should not be difficult
> even without IDE.

Well. The application setup on Geronimo is just like any other, also
requiring an ejb-jar.xml. Though there is one difference, you need the
deployment descriptor. This would be in the jar under
META-INF/openejb-jar.xml.

So just take any EJB jar, and add META-INF/openejb-jar.xml

Minimally it can contain:
<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
         xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">

  <dep:environment>
    <dep:moduleId>
      <dep:groupId>com.yourcompany</dep:groupId>
      <dep:artifactId>YourEJBName</dep:artifactId>
      <dep:version>0.1</dep:version>
      <dep:type>jar</dep:type>
    </dep:moduleId>
</openejb-jar>

>
> By the way, you have work with Geronimo. Is now easy for you to work with
> JMS, Stateful and stateless, interceptor...? Does it work fine?
>

Definitely. You get used to it's way very quickly. I must admin that
Glassfish, which I've worked with more, is much more mature on the
"intuitive" front, requiring very little knowledge of the server in
order to get started. Geronimo is getting there. Though the extra
effort is worth it. The performance gains on the EJB front alone makes
me never want to turn away. Too bad Geronimo hasn't been pitted
against the apparently "fastest appserver, Glassfish". Geronimo is
also very flexible, so the better you get to know it, the more you
will be able to do with it.

Q

Re: Where to download an ejb3 app already packaged/deployed

by Antonio Fornié :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you again. I'm trying to use your help for my sample app.

Please, can you tell if I'm right with this app file structure (there's no zipped file like jar or war, only folders):

\helloear
|---\META-INF
     |---application.xml
|---\helloweb
     |---\WEB-INF
           |---web.xml
           |---\classes
                |---HelloServlet.class
           |---\lib
                |---*.jar
|---\helloejb
           |---\classes
                |---HelloInterface.class
                |---HelloBean.class
           |---\lib
                |---*.jar
           |---\META-INF
                |---ejb-jar.xml

Is it right? Can I have helloweb and helloejb as folder or must I have a zipped file (jar/war) with everything inside?

Thank you very much.
   



Re: Where to download an ejb3 app already packaged/deployed

by djencks :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 8, 2009, at 6:11 AM, Antonio Fornié wrote:

>
> Thank you again. I'm trying to use your help for my sample app.
>
> Please, can you tell if I'm right with this app file structure  
> (there's no
> zipped file like jar or war, only folders):
>
> \helloear
> |---\META-INF
>     |---application.xml
> |---\helloweb
>     |---\WEB-INF
>           |---web.xml
>           |---\classes
>                |---HelloServlet.class
>           |---\lib
>                |---*.jar

ok so far, although see note below
> |---\helloejb
>           |---\classes
remove the /classes directory, put the ejbs directly in "helloejb"
>                |---HelloInterface.class
>                |---HelloBean.class
>           |---\lib
>                |---*.jar
no lib dir is allowed in an ejb jar.  You can put it in helloear  
directly
>           |---\META-INF
>                |---ejb-jar.xml
>
> Is it right? Can I have helloweb and helloejb as folder or must I  
> have a
> zipped file (jar/war) with everything inside?

This might work as long as you label the modules correctly in  
application.xml, however I think you might need to rename the module  
directories helloweb.war and helloejb.jar.

We do have some sample apps that should work OK on 2.1.4, and they got  
published to a maven repo...

http://cwiki.apache.org/GMOxDOC21/sample-applications.html

http://repo2.maven.org/maven2/org/apache/geronimo/samples/

I think these do not include the geronimo plans you need to deploy  
them, as we also publish them as predeployed geronimo plugins.

The docs have a link to the svn checkout.

thanks
david jencks

>
> Thank you very much.
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Where-to-download-an-ejb3-app-already-packaged-deployed-tp25801685s134p25802978.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: Where to download an ejb3 app already packaged/deployed

by Antonio Fornié :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It works. It works. It works. Thank you (Quintin and djencks) very much for your help.

My next step will be MDBs and integrating EJBs with a web framework (surely Vaadin). I hope not having many problems, otherwise I'd try not to disturb too much asking for help.

Re: Where to download an ejb3 app already packaged/deployed

by Quintin Beukes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's not a problem asking for help. Rather ask than be stuck for hours.

Quintin Beukes



On Fri, Oct 9, 2009 at 10:07 AM, Antonio Fornié
<sitaronocturnal@...> wrote:

>
> It works. It works. It works. Thank you (Quintin and djencks) very much for
> your help.
>
> My next step will be MDBs and integrating EJBs with a web framework (surely
> Vaadin). I hope not having many problems, otherwise I'd try not to disturb
> too much asking for help.
> --
> View this message in context: http://www.nabble.com/Where-to-download-an-ejb3-app-already-packaged-deployed-tp25801685s134p25817109.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>