You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by James D Carroll <ja...@verizon.net> on 2009/04/02 06:12:49 UTC

JPA Jars/ Hibernate/ EJB

I'm looking to write an app that will probably start as Swing ->
Hibernate -> DB app, but might move to a GWT-> Servlet -> EJB -> DB app
and was thinking that using JPA Annotations would save some work.

1. Would it work?
2. Where do I get the J5EE jars to put in my Eclipse build path?  The
only thing that I can find on the sun site is a .bin that I can't get to
run for the life of me. Not that I want Glassfish anyways; I'm targeting
Geronimo. 

Thanks,


Re: JPA Jars/ Hibernate/ EJB

Posted by David Blevins <da...@visi.com>.
On Apr 1, 2009, at 9:12 PM, James D Carroll wrote:

> I'm looking to write an app that will probably start as Swing ->
> Hibernate -> DB app, but might move to a GWT-> Servlet -> EJB -> DB  
> app
> and was thinking that using JPA Annotations would save some work.
>
> 1. Would it work?
> 2. Where do I get the J5EE jars to put in my Eclipse build path?  The
> only thing that I can find on the sun site is a .bin that I can't  
> get to
> run for the life of me. Not that I want Glassfish anyways; I'm  
> targeting
> Geronimo.

Hi James,

All the various spec libraries are in the maven repository here:

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

In terms of starting with Swing and eventually going to GWT/Servlet,  
you could still use EJB in either case.  In the Swing setup you could  
embed the EJB container in your Swing app, then when you deploy to  
Geronimo you can use the EJB container there.

Here are some examples of embeddable EJB container usage:  http://openejb.apache.org/examples.html

Note those are test cases, but the concept applies equally to any  
plain java environment.  Also note that this very Embeddable EJB  
Container concept is being added to the EJB 3.1 specification itself.

Theoretically, you should be able to design with the final  
architecture in mind from the start and share the same "backend"  
between the Swing and Web GUIs.

Hope that helps!

-David