-
1. Re: Datasource with MySQL+CMP 2 problem
adrian.brock Apr 18, 2004 4:41 PM (in response to henryle)Post your config, an error message or something.
NOT IT DOES NOT WORK.
Regards,
ADrian -
2. Re: Datasource with MySQL+CMP 2 problem
henryle Apr 18, 2004 5:15 PM (in response to henryle)Thank you adrian. I 'm suprised at the very fast reply.
I'm sorry about problem with CMP2.0, i used datasourcename instead java:/datasourcename. now i fixed it. But i can't lookup that datasource
Context ctx = getInitCtx();//set properties
Object objds = ctx.lookup("datasourcename")//java:/datasourcename , i tried.
--> datasourcename not bound ??? ejb work with that datasource ????
there're my configuration file :
--mysql-ds.xml--
-
- <local-tx-datasource>
<jndi-name>mysqldstest</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/test</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
rootpassword
</local-tx-datasource>
--mysql-jdbc2-service.xml--
<depends optional-attribute-name="ConnectionManager">jboss.jca:service=LocalTxCM,name=mysqldstest
--standardjbosscmp-jdbc.xml--
- <jbosscmp-jdbc>
-
java:/mysqldstest
<datasource-mapping>mySQL</datasource-mapping> -
3. Re: Datasource with MySQL+CMP 2 problem
adrian.brock Apr 18, 2004 5:26 PM (in response to henryle)The java: namespace is not accessible outside the virtual machine
Support for remote access of DataSources has been added in JBoss4,
but I wouldn't recommend this anti-pattern -
4. Re: Datasource with MySQL+CMP 2 problem
henryle Apr 18, 2004 5:53 PM (in response to henryle)I failed when i try to get Datasource outside. I think it lookup datasource (for furure app want to share datasource) is a flexible way. Thank you for your help.
-
5. Re: Datasource with MySQL+CMP 2 problem
nsr_250 Apr 23, 2004 2:22 PM (in response to henryle)So that means there is no way for the above code to work? Do I need to deploy my code to the server and run it since "The java: namespace is not accessible outside the virtual machine"?
-
6. Re: Datasource with MySQL+CMP 2 problem
adrian.brock Apr 25, 2004 9:26 AM (in response to henryle)That is one obvious corollary.
The other one is use a DataSource inside your client.