Hi!
Darius Davidavicius wrote:
> I still have problems :((
>
> >Have you added a resource reference "jdbc/OraclePool" in your
> ejb-jar.xml?
> Its mapped like in ejb-jar.xml:
> <entity>
> <ejb-name>EMailContact</ejb-name>
> <home>com.ls.dialog.ejb.email.EMailContactHome</home>
> <remote>com.ls.dialog.ejb.email.EMailContact</remote>
> <ejb-class>com.ls.dialog.ejb.email.EMailContactBean</ejb-class>
> <persistence-type>Bean</persistence-type>
> <prim-key-class>com.ls.dialog.ejb.contact.ContactPK</prim-key-class>
> <reentrant>False</reentrant>
>
> <resource-ref>
> <res-ref-name>OraclePool</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> </entity>
Well, you have given it the name java:comp/env/OraclePool, so no wonder
you're not seeing it :-) If you want it under
java:comp/env/jdbc/OraclePool (recommended) then set the name to
"jdbc/OraclePool" instead.
> >Have you mapped this to "OraclePool" in jboss.xml?
> Its mapped like:
>
> <resource-managers>
> <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
> <res-name>OraclePool</res-name>
> <res-jndi-name>OraclePool</res-jndi-name>
> </resource-manager>
> </resource-managers>
Looks ok.
> <entity>
> <ejb-name>EMailContact</ejb-name>
> <jndi-name>EMailContactHome</jndi-name>
> <resource-ref>
> <res-ref-name>OraclePool</res-ref-name>
> <resource-name>OraclePool</resource-name>
> </resource-ref>
> </entity>
Change res-ref-name to jdbc/OraclePool.
> And my client gets Exception :
> java.rmi.ServerException: RemoteException occurred in server thread;
> nested exception is: java.rmi.ServerException: Transaction rolled
> back:javax/sql/DataSource
> when i do trying
>
> initCtx = new InitialContext();
> DataSource ds = (javax.sql.DataSource) initCtx.lookup("OraclePool");
> return ds.getConnection();
You're not trying to return the pool to your client are you!?? They're
not serializable.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]