I making a Staless Session EJB connect with Hibernate and do some simple stuff with
postgres, it worked for a while
but then all of the sudden everything stops working
my directory structure is
ejbhiernate.ear(FULL ENTERPRISE APPLICATION)
EAR
META-INF
application.xml
jboss-app.xml
jboss-service.xml
mappings
User.hbm.xml
ejbhibernate.jar(EJB for accessing hibernate and then postgres)
client.war(web application to see the EJB results)
hibermap.sar(mappings and xmls)
JAR(EJB folder, will be created an JAR out of this and then go in ear)
META-INF
ejb-jar.xml
jboss.xml
org.jboss.ejbhibernate
classes EJB(Bean,Remote,etc)
SAR(Hibernate folder, will be created an SAR then go to EAR folder
META-INF
jboss-service.xml(it is already on EAR, DOES IT NEED TO GO HERE
TOO?)
mappings(SAME THING HERE, WICH ONE SHOULD BE REMOVED?)
User.hbml.xml
org.jboss.ejbhibernate(the PERSISTENT DATABASE classes, but I think they
useless here, ANYONE knows if they should be go here also?-beside on
war/web-inf/classes?)
src(compiled classes from ANT of EJB and Servlets of the war)
war
WEB-INF
Classes
org.jboss.ejbhibernate
EJBHomeInteface
ServletForStartingEverything
+ a bunch of classes from ejb that
came along with ant copied from src
Jboss-web.xml
web.xml
How do i OPTIMIZE this situation.????
Jboss keep alerting that hibernate.cfg.xml is not found yet you dont
need it when you using hibernate as mbean, whats Im doing wrong?
I have jboss-service.xml(in both SAR and EAR) as
jboss.jca:service=SARDeployer
jboss.jca:service=LocalTxCM,name=PostgresDS
<!-- Make it deploy ONLY after DataSource had been started -->
mappings/User.hbm.xml
java:/hibernate/HibernateFactory
java:/PostgresDS
net.sf.hibernate.dialect.PostgreSQLDialect
net.sf.hibernate.transaction.JTATransactionFactory
net.sf.hibernate.transaction.JBossTransactionManagerLookup
false
false
UserTransaction
It deploys PERFECTLY, jndi is bound, mappings ok, but then when the SERVLET OR EJB
tries to connect with hibernate with
sessionFactory = new Configuration().configure().buildSessionFactory();
it gives 'hibernate.cfg.xml' not found, where is the ERROR?
Any idea?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829132#3829132
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829132
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user