[jboss-user] [JBoss Portal] - Re: UserModule, Hibernate JTA transaction & Ajax Request

apemberton do-not-reply at jboss.com
Wed Jan 21 23:12:55 EST 2009

As for the portlet, in order to have a portlet share in the portal's JTA transaction, you can add the following to your jboss-portlet.xml:

  | 	<portlet>
  | 		<portlet-name>YourPortlet</portlet-name>
  | 		<transaction>
  | 			<trans-attribute>Required</trans-attribute>
  | 		</transaction>
  | 	</portlet>
  | </portlet-app>

Depending on your usage scenario, there are a lot of ways to create hibernate sessions from a servlet. For example, Spring utilizes a servlet filter to bind a Hibernate Session to the thread servicing your request. Though, I'm not sure this is what you want/need to do.

I'd be interested to know more about the kind of code you're trying to use in the AJAX servlet and the errors you're seeing.

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

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

More information about the jboss-user mailing list