Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » WebServiceHandler does not use template method to create EntityManager
WebServiceHandler does not use template method to create EntityManager [message #998801] Thu, 10 January 2013 18:08 Go to next message
Donat Mueller is currently offline Donat MuellerFriend
Messages: 11
Registered: January 2013
Location: switzerland
Junior Member
Hi,

In WebServiceHandler.java on line 133 an EntityManager for the the ServiceContext is created with
entityManager = EntityManagerProvider.getInstance().createEntityManager();

There is a template method protected EntityManager createEntityManager() which is never used.

The descriptions says:
Can be overridden for specific logic to get the entity manager. In that case also override the releaseEntityManager().

I want to delegate requests for virtual models (without jpa annotations) to a generic persistent model. Therefore it would be convenient to override the EntityManager in order to translate the requests to the other model and then reply with marshaled objects from the source model.

Please let me know if there is a reason for not using the template method.

thanks,
Donat
Re: WebServiceHandler does not use template method to create EntityManager [message #998907 is a reply to message #998801] Fri, 11 January 2013 00:00 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Donat,
An omission, I pushed a fix and published a new build. Can you retry/recheck the latest build?

gr. Martin

On 01/10/2013 07:57 PM, Donat Mueller wrote:
> Hi,
>
> In WebServiceHandler.java on line 133 an EntityManager for the the ServiceContext is created with
> entityManager = EntityManagerProvider.getInstance().createEntityManager();
>
> There is a template method protected EntityManager createEntityManager() which is never used.
>
> The descriptions says: Can be overridden for specific logic to get the entity manager. In that case also override the
> releaseEntityManager().
>
> I want to delegate requests for virtual models (without jpa annotations) to a generic persistent model. Therefore it
> would be convenient to override the EntityManager in order to translate the requests to the other model and then reply
> with marshaled objects from the source model.
>
> Please let me know if there is a reason for not using the template method.
>
> thanks,
> Donat
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: WebServiceHandler does not use template method to create EntityManager [message #999184 is a reply to message #998907] Fri, 11 January 2013 14:31 Go to previous message
Donat Mueller is currently offline Donat MuellerFriend
Messages: 11
Registered: January 2013
Location: switzerland
Junior Member
Hi Martin,

Works now

Thanks,
Donat
Previous Topic:Texo - ECore reference to another ECore using archive:
Next Topic:texo webservice support for nested packages
Goto Forum:
  


Current Time: Thu Mar 28 11:05:11 GMT 2024

Powered by FUDForum. Page generated in 0.02079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top