-
1. Re: JBoss 3.0 Changing Datasource in CMP bean using Xdoclet
koomiv Sep 24, 2002 10:42 AM (in response to matn1)you have to deploy a mysql-service.xml
in your xdoclet build target you specify jboss as server target and mysql as a data source
like this(this is for oracle chage with mysql)
voila -
2. Re: JBoss 3.0 Changing Datasource in CMP bean using Xdoclet
matn1 Sep 24, 2002 12:52 PM (in response to matn1)Thanks for the reply. Actually, what I ended up doing
is the following.
1) Using the template project scheme Andreas has put together. By the way it is very useful and easy to follow to build J2EE apps.
2) Modifying the template build.xml file and specifically modify the .ant.properties file and change 2 entries below.
# Set the DB type mapping (Hypersonic SQL, PostgreSQL etc., see XDoclet's attribute "typemapping")
type.mapping=mySQL
# Set the DataSource name your are going to use (java:/DefaultDS etc., see XDoclet's attribute "datasource")
datasource.name=java:/MySqlDS
The ejbdoclet task under the target in the build.xml
( <target name="xdoclet-generate" )
will read in these environment properties and generate the proper deployment descriptor xml files under the META-INF.
Under the DataSource where I had the default
HyperSonic DataSource
<jbosscmp-jdbc>
java:/DefaultDS
<datasource-mapping>Hypersonic SQL</datasource-mapping>
It NOW Changes to the proper ones I want. I just have to make sure the datasource entry is already bound in JBOSS.
jbosscmp-jdbc>
java:/MySqlDS
<datasource-mapping>mySQL</datasource-mapping>