On Tue, 3 Oct 2000, Jay Walters wrote:
> Here are two ways to set your default datasource, one is to add a jaws.xml
> file to your application jar file with something like:
>
> <jaws>
> <datasource>OraclePool</datasource>
> <type-mapping>Oracle</type-mapping>
> </jaws>
>
> The other more permanent and global option is to unjar jboss.jar, edit the
> defaultjaws.xml file adding the middle two lines from above at the top, and
> then rejar it back up. Of course this gives you a custom jboss.jar file
> which might not be the best idea ever.
This only affects CMP Entity Beans... (more below)
> A third way is to set up resources in your ejb-jar.xml and jboss.xml file so
> the beans are mapped to an explicit data source instead of the default data
> source.
>
> Add something like
>
> <resource-ref>
> <res-ref-name>jdbc/CartDs</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> to the entity bean descriptor in ejb-jar.xml.
>
> Add something like
>
> <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
> <res-name>jdbc/CartDs</res-name>
> <res-jndi-name>OraclePool</res-jndi-name>
> </resource-manager>
>
> to the application jboss.xml.
And this only affects beans that use a DB connection directly (and declare
a DataSource reference in ejb-jar.xml). You'll have to do one or both
depending on the types of EJBs you're using.
Aaron
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]