Beginner |
 |
Joined: Fri Feb 27, 2004 3:49 am Posts: 25
|
i got it. thanks.
may i ask another question? my application will be connect to two different database(one is MySQL and another is HSQLDB). i use JBoss as my application server and generate jboss-service.xml to connect MySQL. how my application connect to HSQLDB ?
below is my jboss-service.xml. is it need to add another mbean for hsqldb? when do transaction, how hibernate session switch between that two different database?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- Generated file - Do not edit! -->
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=Hibernate">
<depends>jboss.jca:service=RARDeployer</depends>
<attribute name="MapResources"></attribute>
<attribute name="JndiName">java:/HibernateFactory</attribute>
<attribute name="Datasource">java:MySqlDSEPLY</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
<attribute name="UserName">user</attribute>
<attribute name="Password">123</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="ShowSql">true</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
</mbean>
</server>
thanks ...
|
|