This content has been marked as final.
Show 2 replies
-
1. Re: Datasource and CMP entity bean
thejavafreak Feb 17, 2005 6:39 AM (in response to kismorc)Perhaps it is because you forgot to tell whisc datasource you use in ejb.xml. Hope this helps.
-
2. Re: Datasource and CMP entity bean
kismorc Feb 17, 2005 8:28 AM (in response to kismorc)defkewl:
I tried to add <resource-ref> to jboss.xml and ejb.xml but it didn't help.
But then I read it on the Net, that I should use jbosscmp-jdbc.xml instead of jaws.xml.
So I created one<?xml version="1.0" encoding="UTF-8"?> <jbosscmp-jdbc> <defaults> <datasource>java:/testDataSource</datasource> <type-mapping>Oracle8</type-mapping> <debug>true</debug> <create-table>true</create-table> <remove-table>false</remove-table> <read-only>false</read-only> <time-out>0</time-out> <select-for-update>false</select-for-update> <pk-constraint>true</pk-constraint> <relation-mapping-style>foreign-key</relation-mapping-style> <read-ahead> <strategy>on-load</strategy> <page-size>500</page-size> <eager-load-group>group name</eager-load-group> </read-ahead> </defaults> <enterprise-beans> <entity> <ejb-name>Enterprise1BeanName</ejb-name> <table-name>EJBTEST</table-name> <cmp-field> <field-name>id</field-name> <column-name>ID</column-name> </cmp-field> <cmp-field> <field-name>payload</field-name> <column-name>PAYLOAD</column-name> </cmp-field> </entity> </enterprise-beans> </jbosscmp-jdbc>
and then the CMP worked.
Peter