Hi Peter,


 The name of the datasource will be placed in  JNDI, straight from the conf
file. You can use this directly or....

...

define datasource in jboss.conf (as above)

 <MLET CODE = "org.jboss.jdbc.DataSourceImpl"
ARCHIVE="jboss.jar,interclient.jar" CODEBASE="../lib/ext/">
   <ARG TYPE="java.lang.String"
VALUE="jdbc:interbase://localhost/e:/dev/db.gdb">
   <ARG TYPE="java.lang.String" VALUE="Interbase">
   <ARG TYPE="java.lang.String" VALUE="interbase.interclient.Driver">
   <ARG TYPE="java.lang.String" VALUE="sysdba">
   <ARG TYPE="java.lang.String" VALUE="masterkey">
 </MLET>



add a resource ref in ejb-jar.xml

     <resource-ref>
        <description />
        <res-ref-name>jdbc/interbase</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
     </resource-ref>


and tie it to the pool in jboss.xml

     <resource-managers>
       <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
         <res-name>jdbc/interbase</res-name>
         <jndi-name>Interbase</jndi-name>
       </resource-manager>
     </resource-managers>

your code will refer to this as  "java:comp/env/jdbc/interbase"


Hope this Helps,

-Rob



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Peter Shillan
Sent: Friday, August 18, 2000 4:44 AM
To: JBoss User
Subject: [jBoss-User] Using a different db


Hi there,

I want to specify that my entity beans should a new datasource. To do this I
started looking around.

I think you have to add a MLET in the jBoss.conf file to point to the new
datasource. That's fair enough, but how do I get the beans to use that
datasource? Do I have to create a new container configuration in jBoss.xml
and fill in the <persistence-manager> tag perhaps (with the jndi name of the
datasource)?

Help would be appreciated.

Peter.



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to