[jboss-user] [JBoss Seam] - using setParameterList with the EntityManager query

jrwsampson do-not-reply at jboss.com
Mon Dec 31 16:18:59 EST 2007


I need to be able to select with an IN query and a collection... something like this:


  | createQuery("from Campaign campaign where campaign.advertiser in (:advertisers) order by advertiserId").setParameterList("advertisers", selectedAdvertisers)
  | 

The EM doesn't support the setParameterList method. So instead I tried to create the query on an injected org.hibernate.Session object, but that generates the following exception:
javax.resource.ResourceException: Transaction is not active:

I am in a conversation, and the session object comes from this in components.xml:


  | 	<factory name="session" 
  |          scope="STATELESS" 
  |          auto-create="true" 
  |          value="#{entityManager.delegate}"/>     
  | 

Am I barking up the wrong tree here?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116204#4116204

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116204



More information about the jboss-user mailing list