You need a datasource and type-mapping tag in your jaws.xml file like this.
<datasource>OracleDB</datasource>
<type-mapping>Oracle</type-mapping>
If your are creating and editing your XML files with ejx then open your ejb-jar.xml as
a Jaws file and the change the datasource and type mappings on the EJB Jar tab.
Hope this helps
Brandon Campbell
>>> [EMAIL PROTECTED] 10/27/00 07:58AM >>>
Where can I define to a Entity Bean access a Database ?
I set my database in jboss.conf :
<mbean name="DefaultDomain:service=XADataSource,name=OracleDB">
<attribute
name="URL">jdbc:oracle:thin:@192.168.0.13:1521:linux</attribute>
<attribute name="JDBCUser">fotoptica</attribute>
<attribute name="Password">fotoptica</attribute>
</mbean>
And I create a DemoBean that must persist a id and a name id table Demo in
database Fotoptica on Oracle 8i. Here's my ejb-jar.xml :
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<display-name>DemoEJB</display-name>
<enterprise-beans>
<entity>
<description>Models a Demo</description>
<ejb-name>DemoBeanEE</ejb-name>
<home>ejb.demo.DemoHome</home>
<remote>ejb.demo.Demo</remote>
<ejb-class>ejb.demo.DemoBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<primkey-field>id</primkey-field>
</entity>
</enterprise-beans>
<!-- more beans here -->
</ejb-jar>
Then when I copy demo.jar to jboss/deploy I receive the following error :
[Container factory] Deploying DemoBeanEE
[Container factory] org.jboss.ejb.DeploymentException: Hypersonic not bound
I think that Jboss is trying to use Hypersonic to persist my Entity Bean,
and I'd like to use Oracle. How can I change to database that DemoBeanEE
must use ?
Thanks in advance,
Sergio Stateri Jr
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tesla Tecnologia
Sao Paulo (SP) Brazil
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]