You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John <jo...@quivinco.com> on 2012/11/07 09:32:51 UTC

Tapestry JPA + Stored Procedures

I got the JPA(with eclipselink) to work and have been using @NamedStoredProcedureQuery annotations in entities to obtain entity classes successully from SQLServer. This technique doesn't seem to work well or fit the situation where the stored proc just returns output parameters (no entity class required). For this I think I need a Session to do a more programatic solution to call the stored proc.

Does Tapestry help obtain this object with an injection?

John

Re: Tapestry JPA + Stored Procedures

Posted by John <jo...@quivinco.com>.
I didn't see anything to inject so ended up doing the below code which seems clumsy (but works!)

JpaEntityManager jpaEntityManager = JpaHelper.getEntityManager(entityManager);

Session session = jpaEntityManager.getActiveSession();

  ----- Original Message ----- 
  From: Kristian Marinkovic 
  To: Tapestry users 
  Sent: Wednesday, November 07, 2012 8:23 PM
  Subject: Re: Tapestry JPA + Stored Procedures


  Hi,
  you can inject the session directly. please take a look at the
  documentation.

  G,
  Kris
  Am 07.11.2012 09:31 schrieb "John" <jo...@quivinco.com>:

  > I got the JPA(with eclipselink) to work and have been using
  > @NamedStoredProcedureQuery annotations in entities to obtain entity classes
  > successully from SQLServer. This technique doesn't seem to work well or fit
  > the situation where the stored proc just returns output parameters (no
  > entity class required). For this I think I need a Session to do a more
  > programatic solution to call the stored proc.
  >
  > Does Tapestry help obtain this object with an injection?
  >
  > John
  >

Re: Tapestry JPA + Stored Procedures

Posted by Kristian Marinkovic <kr...@gmail.com>.
Hi,
you can inject the session directly. please take a look at the
documentation.

G,
Kris
Am 07.11.2012 09:31 schrieb "John" <jo...@quivinco.com>:

> I got the JPA(with eclipselink) to work and have been using
> @NamedStoredProcedureQuery annotations in entities to obtain entity classes
> successully from SQLServer. This technique doesn't seem to work well or fit
> the situation where the stored proc just returns output parameters (no
> entity class required). For this I think I need a Session to do a more
> programatic solution to call the stored proc.
>
> Does Tapestry help obtain this object with an injection?
>
> John
>