-
1. Re: EJB3 Tutorial - Entity Bean
shivani Jul 27, 2005 11:19 AM (in response to aho)Hi,
My tables are saved in the db ..they are there..but i still keep getting the userid as null when i give in the username and the password at the client..the table contains all 3 fields.I am unable to retrieve any information frm the db basically.PLease help.
Thank you. -
2. Re: EJB3 Tutorial - Entity Bean
catton2000 Jul 28, 2005 5:43 AM (in response to aho)take a look at META-INF/persistence.xml,the property hibernate.hbm2ddl.auto is the key to create or update or create_drop the tables.if u set it create_drop,ur tables will be deleted after undeploy the ejb3.ps,if u can't find this property,take a look at server/all/deploy/ejb3.deploy/META-INF/persistence.properties.
-
3. Re: EJB3 Tutorial - Entity Bean
aho Jul 28, 2005 10:20 AM (in response to aho)Thanks catton2000. In my server\default\deploy\ejb3.deployer\META-INF\ folder the contents of the persistence.xml is shown below. I guess the create-drop says it all.
I would like to implement a persistence.xml file for MySQL database. Do you know an example anywhere?
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.connection.release_mode=after_statement
hibernate.transaction.flush_before_completion=false
hibernate.transaction.auto_close_session=false
hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory
hibernate.hbm2ddl.auto=create-drop
#hibernate.hbm2ddl.auto=create
hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
# Clustered cache with TreeCache
#hibernate.cache.provider_class=org.jboss.ejb3.entity.TreeCacheProviderHook
#hibernate.treecache.mbean.object_name=jboss.cache:service=EJB3EntityTreeCache
hibernate.connection.datasource=java:/DefaultDS
hibernate.dialect=org.hibernate.dialect.HSQLDialect
javax.persistence.provider=org.hibernate.ejb.HibernatePersistence