-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Where is org.hibernate.ce.auction.web.filter package?
PostPosted: Wed Mar 07, 2007 8:37 pm 
Newbie

Joined: Sat Jan 06, 2007 3:46 pm
Posts: 15
In Ch. 11, p. 493, the text refers to filters in the org.hibernate.ce.auction.web.filter package. But I downloaded the CE example (JPA) and couldn't find such a package.

Where is it?

TIA,
Rick


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 08, 2007 5:25 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The filter in the book is for native Hibernate APIs. You can find it in the CaveatEmptor Hibernate (native) package.

If you want to have similar functionality for JPA, you should use an EJB 3.0 container instead and use EntityManager injection (and scope the transaction to the request somehow) or consider JBoss Seam. There is no API in Java Persistence that can handle a "current" and automaticallk propagated persistence context without an EJB3 runtime container. Hibernate can do that natively without a container.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 08, 2007 2:29 pm 
Newbie

Joined: Sat Jan 06, 2007 3:46 pm
Posts: 15
christian wrote:
The filter in the book is for native Hibernate APIs. You can find it in the CaveatEmptor Hibernate (native) package.

If you want to have similar functionality for JPA, you should use an EJB 3.0 container instead and use EntityManager injection (and scope the transaction to the request somehow) or consider JBoss Seam. There is no API in Java Persistence that can handle a "current" and automaticallk propagated persistence context without an EJB3 runtime container. Hibernate can do that natively without a container.


It's not clear to me that I can easily use EJB3 in our current setup (we're using Resin; Resin 3.1.x has some other issues preventing us from moving to it yet, and I don't know offhand if it supports EJB3, either).

I can manage to store the Spring WebApplicationContext or our DAO beans in the current thread, making them available to the model objects, but I wasn't sure this was a sanctioned approach.

I don't mind using native Hibernate APIs; I don't need to be purely JPA. But I do want to use annotations instead of XML files. If it turns out I can use EJB3 without too much pain with Resin (I don't want to switch to JBoss), then I can explore that. But it seems that I must read a great deal more about it to find out if it will even work for me, and I have not had time for that.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 08, 2007 4:07 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Seriously, have a look at Seam. You can use it without EJBs in a servlet container and it does all that stuff. Read the last chapter of the book about it.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.