You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Felipe Lorenz <fe...@gmail.com> on 2008/10/02 18:06:14 UTC
JPA Toplink without Spring
Hi.
Im trying to find on google what is the best practice to use
jpa(toplink). Where i should save the EntityManagerFactory?
ApplicationScope? Session? And create an EntityManager for each action
called? How? Existe an tutorial for? I just found tutorials using
Spring and Hibernate.
Thanks in advice.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JPA Toplink without Spring
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
You're not going to have any IoC container? Or just the struts one? Or something
else?
I would definitely use the OpenEntityManagerInView Filter / Interceptor pattern.
I rolled my own 'context manager' which has some static methods to access things
like EntityManagers in a threadsafe way, and I configure the servlet container
to launch it at start-up.
You didn't mention EJBs, but they'd offer a way to handle transactions,
otherwise you'll be hard-coding them, unless you're going to do without it.
Regards
Adam
Felipe Lorenz on 03/10/08 17:12, wrote:
> Thanks folk... ill see it!!
>
> On Thu, Oct 2, 2008 at 1:36 PM, Martin Gainty <mg...@hotmail.com> wrote:
>> attempting to follow your sans Spring implementation curious as to which
>> Bean will you be using to take the place of JndiObjectFactoryBean?
>>
>> another alternative would be to implement a stateless session bean such as
>> what is described at
>> http://www.oracle.com/technology/pub/articles/dikmans-spring-toplink.html
>>
>> does this help? Martin _______
>>>
>>> Hi Felipe,
>>>
>>> sorry, didn't read carefully. Did you have a lool at Oracle's Toplink
>>> Forum ?
>>> http://forums.oracle.com/forums/forum.jspa;jsessionid=8d92201c30d6c8545719450d4cc49ae1ecd52fbaab42.e34Qc3aLbh8RbO0LbxmRb3eObNeMe0?forumID=48&start=0
>>>
>>>
>>>
>>> or Oracle's toplink page:
>>> http://www.oracle.com/technology/products/ias/toplink/index.html
>>>
>>> There are also some Toplink-Howtos to find:
>>> http://www.oracle.com/technology/products/ias/toplink/technical/tips/index.html
>>>
>>>
>>>
>>> Maybe that helps you.
>>>> Felipe Lorenz schrieb:
>>>>>>> Hi.
>>>>>>>
>>>>>>> Im trying to find on google what is the best practice to use
>>>>>>> jpa(toplink). Where i should save the EntityManagerFactory?
>>>>>>> ApplicationScope? Session? And create an EntityManager for each
>>>> action
>>>>>>> called? How? Existe an tutorial for? I just found tutorials using
>>>>>>> Spring and Hibernate.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JPA Toplink without Spring
Posted by Felipe Lorenz <fe...@gmail.com>.
Thanks folk... ill see it!!
On Thu, Oct 2, 2008 at 1:36 PM, Martin Gainty <mg...@hotmail.com> wrote:
>
> attempting to follow your sans Spring implementation
> curious as to which Bean will you be using to take the place of JndiObjectFactoryBean?
>
> another alternative would be to implement a stateless session bean such as what is described at
> http://www.oracle.com/technology/pub/articles/dikmans-spring-toplink.html
>
> does this help?
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
>
>
>> Date: Thu, 2 Oct 2008 21:45:49 +0200
>> From: volker@magiccode.eu
>> To: user@struts.apache.org
>> Subject: Re: JPA Toplink without Spring
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi Felipe,
>>
>> sorry, didn't read carefully. Did you have a lool at Oracle's Toplink
>> Forum ?
>> http://forums.oracle.com/forums/forum.jspa;jsessionid=8d92201c30d6c8545719450d4cc49ae1ecd52fbaab42.e34Qc3aLbh8RbO0LbxmRb3eObNeMe0?forumID=48&start=0
>>
>> or Oracle's toplink page:
>> http://www.oracle.com/technology/products/ias/toplink/index.html
>>
>> There are also some Toplink-Howtos to find:
>> http://www.oracle.com/technology/products/ias/toplink/technical/tips/index.html
>>
>> Maybe that helps you.
>>
>> Felipe Lorenz schrieb:
>> > Thanks for replay.
>> >
>> > But thats the problem... im not using spring. So, do you have a
>> > clue?
>> >
>> > On Thu, Oct 2, 2008 at 9:31 AM, Volker Karlmeier
>> > <vo...@magiccode.eu> wrote:
>> > http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html
>> >
>> > http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm
>> > http://almaer.com/blog/toplink-spring-integration
>> > http://www.saunderswebsolutions.com/articlecontent/7
>> >
>> > May find more using "Spring toplink howto" in Google :)
>> >
>> >
>> >
>> > Felipe Lorenz schrieb:
>> >>>> Hi.
>> >>>>
>> >>>> Im trying to find on google what is the best practice to use
>> >>>> jpa(toplink). Where i should save the EntityManagerFactory?
>> >>>> ApplicationScope? Session? And create an EntityManager for
>> >>>> each
>> > action
>> >>>> called? How? Existe an tutorial for? I just found tutorials
>> >>>> using Spring and Hibernate.
>> >>>>
>> >>>> Thanks in advice.
>> >>>>
>> >>>>
>> > ---------------------------------------------------------------------
>> >
>> >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >>>> For additional commands, e-mail: user-help@struts.apache.org
>> >>>>
>> >
>> >>
>> >>
>> - ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>>
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For
>> > additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>> - --
>>
>> - -------------------------------
>> V. Karlmeier
>> Friedrich-Freye-Str. 61
>> D-45481 Mülheim/Ruhr
>> Tel. : +49-(0)208-7785675
>> Mobile: +49-(0)176-21056587
>> Mail : volker@magiccode.eu
>> web : http://www.magiccode.eu
>> - -------------------------------
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.3 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFI5STtx4KjH6Tk4MMRAuCzAKCTVtUrNNllR7U/W4teDapitIXdhgCfXOpM
>> V+RO2vPBL0nC/KNEGXd297Q=
>> =dMDo
>> -----END PGP SIGNATURE-----
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> _________________________________________________________________
> Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: JPA Toplink without Spring
Posted by Martin Gainty <mg...@hotmail.com>.
attempting to follow your sans Spring implementation
curious as to which Bean will you be using to take the place of JndiObjectFactoryBean?
another alternative would be to implement a stateless session bean such as what is described at
http://www.oracle.com/technology/pub/articles/dikmans-spring-toplink.html
does this help?
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Thu, 2 Oct 2008 21:45:49 +0200
> From: volker@magiccode.eu
> To: user@struts.apache.org
> Subject: Re: JPA Toplink without Spring
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Felipe,
>
> sorry, didn't read carefully. Did you have a lool at Oracle's Toplink
> Forum ?
> http://forums.oracle.com/forums/forum.jspa;jsessionid=8d92201c30d6c8545719450d4cc49ae1ecd52fbaab42.e34Qc3aLbh8RbO0LbxmRb3eObNeMe0?forumID=48&start=0
>
> or Oracle's toplink page:
> http://www.oracle.com/technology/products/ias/toplink/index.html
>
> There are also some Toplink-Howtos to find:
> http://www.oracle.com/technology/products/ias/toplink/technical/tips/index.html
>
> Maybe that helps you.
>
> Felipe Lorenz schrieb:
> > Thanks for replay.
> >
> > But thats the problem... im not using spring. So, do you have a
> > clue?
> >
> > On Thu, Oct 2, 2008 at 9:31 AM, Volker Karlmeier
> > <vo...@magiccode.eu> wrote:
> > http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html
> >
> > http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm
> > http://almaer.com/blog/toplink-spring-integration
> > http://www.saunderswebsolutions.com/articlecontent/7
> >
> > May find more using "Spring toplink howto" in Google :)
> >
> >
> >
> > Felipe Lorenz schrieb:
> >>>> Hi.
> >>>>
> >>>> Im trying to find on google what is the best practice to use
> >>>> jpa(toplink). Where i should save the EntityManagerFactory?
> >>>> ApplicationScope? Session? And create an EntityManager for
> >>>> each
> > action
> >>>> called? How? Existe an tutorial for? I just found tutorials
> >>>> using Spring and Hibernate.
> >>>>
> >>>> Thanks in advice.
> >>>>
> >>>>
> > ---------------------------------------------------------------------
> >
> >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>
> >
> >>
> >>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For
> > additional commands, e-mail: user-help@struts.apache.org
>
>
>
> - --
>
> - -------------------------------
> V. Karlmeier
> Friedrich-Freye-Str. 61
> D-45481 Mülheim/Ruhr
> Tel. : +49-(0)208-7785675
> Mobile: +49-(0)176-21056587
> Mail : volker@magiccode.eu
> web : http://www.magiccode.eu
> - -------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFI5STtx4KjH6Tk4MMRAuCzAKCTVtUrNNllR7U/W4teDapitIXdhgCfXOpM
> V+RO2vPBL0nC/KNEGXd297Q=
> =dMDo
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
Re: JPA Toplink without Spring
Posted by Volker Karlmeier <vo...@magiccode.eu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Felipe,
sorry, didn't read carefully. Did you have a lool at Oracle's Toplink
Forum ?
http://forums.oracle.com/forums/forum.jspa;jsessionid=8d92201c30d6c8545719450d4cc49ae1ecd52fbaab42.e34Qc3aLbh8RbO0LbxmRb3eObNeMe0?forumID=48&start=0
or Oracle's toplink page:
http://www.oracle.com/technology/products/ias/toplink/index.html
There are also some Toplink-Howtos to find:
http://www.oracle.com/technology/products/ias/toplink/technical/tips/index.html
Maybe that helps you.
Felipe Lorenz schrieb:
> Thanks for replay.
>
> But thats the problem... im not using spring. So, do you have a
> clue?
>
> On Thu, Oct 2, 2008 at 9:31 AM, Volker Karlmeier
> <vo...@magiccode.eu> wrote:
> http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html
>
> http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm
> http://almaer.com/blog/toplink-spring-integration
> http://www.saunderswebsolutions.com/articlecontent/7
>
> May find more using "Spring toplink howto" in Google :)
>
>
>
> Felipe Lorenz schrieb:
>>>> Hi.
>>>>
>>>> Im trying to find on google what is the best practice to use
>>>> jpa(toplink). Where i should save the EntityManagerFactory?
>>>> ApplicationScope? Session? And create an EntityManager for
>>>> each
> action
>>>> called? How? Existe an tutorial for? I just found tutorials
>>>> using Spring and Hibernate.
>>>>
>>>> Thanks in advice.
>>>>
>>>>
> ---------------------------------------------------------------------
>
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>
>>
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For
> additional commands, e-mail: user-help@struts.apache.org
- --
- -------------------------------
V. Karlmeier
Friedrich-Freye-Str. 61
D-45481 Mülheim/Ruhr
Tel. : +49-(0)208-7785675
Mobile: +49-(0)176-21056587
Mail : volker@magiccode.eu
web : http://www.magiccode.eu
- -------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI5STtx4KjH6Tk4MMRAuCzAKCTVtUrNNllR7U/W4teDapitIXdhgCfXOpM
V+RO2vPBL0nC/KNEGXd297Q=
=dMDo
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JPA Toplink without Spring
Posted by Felipe Lorenz <fe...@gmail.com>.
Thanks for replay.
But thats the problem... im not using spring. So, do you have a clue?
On Thu, Oct 2, 2008 at 9:31 AM, Volker Karlmeier <vo...@magiccode.eu> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html
> http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm
> http://almaer.com/blog/toplink-spring-integration
> http://www.saunderswebsolutions.com/articlecontent/7
>
> May find more using "Spring toplink howto" in Google :)
>
>
>
> Felipe Lorenz schrieb:
>> Hi.
>>
>> Im trying to find on google what is the best practice to use
>> jpa(toplink). Where i should save the EntityManagerFactory?
>> ApplicationScope? Session? And create an EntityManager for each action
>> called? How? Existe an tutorial for? I just found tutorials using
>> Spring and Hibernate.
>>
>> Thanks in advice.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>
> - --
>
> - -------------------------------
> V. Karlmeier
> Friedrich-Freye-Str. 61
> D-45481 Mülheim/Ruhr
> Tel. : +49-(0)208-7785675
> Mobile: +49-(0)176-21056587
> Mail : volker@magiccode.eu
> web : http://www.magiccode.eu
> - -------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFI5Pdbx4KjH6Tk4MMRAvnCAKCipK45llx9WhyLemyWn8NU2F4IXgCdEmC6
> NNxaNZ/dK0z43B+ad9TrRec=
> =xcJZ
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JPA Toplink without Spring
Posted by Volker Karlmeier <vo...@magiccode.eu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html
http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm
http://almaer.com/blog/toplink-spring-integration
http://www.saunderswebsolutions.com/articlecontent/7
May find more using "Spring toplink howto" in Google :)
Felipe Lorenz schrieb:
> Hi.
>
> Im trying to find on google what is the best practice to use
> jpa(toplink). Where i should save the EntityManagerFactory?
> ApplicationScope? Session? And create an EntityManager for each action
> called? How? Existe an tutorial for? I just found tutorials using
> Spring and Hibernate.
>
> Thanks in advice.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
- --
- -------------------------------
V. Karlmeier
Friedrich-Freye-Str. 61
D-45481 Mülheim/Ruhr
Tel. : +49-(0)208-7785675
Mobile: +49-(0)176-21056587
Mail : volker@magiccode.eu
web : http://www.magiccode.eu
- -------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI5Pdbx4KjH6Tk4MMRAvnCAKCipK45llx9WhyLemyWn8NU2F4IXgCdEmC6
NNxaNZ/dK0z43B+ad9TrRec=
=xcJZ
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org