hi,

 I am using my sql with JBOSS.
the problem is that i am connecting to hypersonic database instead of
connecting to the mysql database.
i am using the session bean. 
This is what i have in my jboss.jcml file
 <mbean code="org.jboss.jdbc.XADataSourceLoader" 
         name="DefaultDomain:service=XADataSource,name=mySQLDB">
                <attribute
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
                <attribute
name="PoolName">mySQLFlirtDS</attribute>         
                <attribute
name="URL">jdbc:mysql://baba9.websoft.com/flirtshow2</attribute>
                <attribute name="JDBCUser">w3server</attribute>
                <attribute name="Password"></attribute>
  </mbean>

my Jboss.xml file contains:
<resource-ref> 
        <res-ref-name>jdbc/mySQLDB</res-ref-name> 
        <resource-name>java:/mySQLDB</resource-name> 
        </resource-ref> 

ejb-jar.xml contains
 <resource-ref> 
        <res-ref-name>jdbc/mySQLDB</res-ref-name> 
        <res-type>javax.sql.DataSource</res-type> 
        <res-auth>Container</res-auth> 
        </resource-ref> 
        </session>

And this is how i am getting the connection.

        Context jndiCntx=new InitialContext();
        DataSource
ds=(DataSource)jndiCntx.lookup("java:comp/env/jdbc/mySQLDB");
        return ds.getConnection();

And I am using it in session Bean. but instead of connecting to the
mysql database it is connecting to the default hypersonic database 
So can some one tell me where i am wrong.

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to