[jboss-user] [EJB 3.0] - Re: EJB3.0 SESSIONBEAN WORK WITH HIBERNATE EXCEPTION

paul_lmc do-not-reply at jboss.com
Thu Jun 26 10:02:09 EDT 2008


HibernateUtil LIKE THIS :

public class HibernateUtil {
	public static SessionFactory sf = null;
	public void Init(){
		if(sf == null){
			 sf = new Configuration().configure().buildSessionFactory();
		}
	}

}

WEB.XML LIKE THIS:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
	xmlns="http://java.sun.com/xml/ns/javaee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
	
	
		<listener-class>sysListener.StartUpListener</listener-class>
	
<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

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

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



More information about the jboss-user mailing list