Hello, 
This is perhaps more closely related to Connector/MXJ  than jBoss, but I am 
hoping for someone here has experience with the two that can lend a hand...

Currently I am developing an application using Java JDK 1.4.2, mySQL 5.0.19, 
jBoss 4.0.2, Connector/J 5.0, and Connector/MXJ 5.0.

I am attempting to embedd mySQL by using MXJ act as an MBean that jBoss will 
control. I have the database to communicate with the application, but am 
interested in passing options to MySQL on startup. What I would like to is:

1.) Specify a datadir and basedir
I have added the attributes to my "mysqld-service.xml", but get an error 
stating that the specified directory is not equal to "C:\Documents and 
Settings\user\Temp\mysql-c.mxj\" How can I specify the directory for MXJ to 
setup the data dir in? This works with MXJ 1.1. NOTE - I have gotten this to 
work by changing the source so that the method 'ensureDir' in 
'MysqldResource.java' to change the base and data dir if they are different 
then the expected. I have also changed the order of the calls to:
adjustParameterMap(mysqldArgs)
makeMysqld();
ensureEssentialFilesExist();
To the above order in the meth0d 'exec' in the 'MMysqldResource.java' so that 
the baseDir and dataDir are changed prior to creating the files.
So far, this seems to work as expected, but does anyone see if this will cause 
problems?

2.) call mySQLd with a defaults-file.
I have modified the source to allow me to pass in a defaults-file, but was 
wondering if this was left out intentially as it is not good practice to start 
the MySQL with a defaults file through MXJ.

3.) Connect to MySQL through named pipes as a datasource in jBoss.
For example in my 'mysql-ds.xml' in my jboss/deploy folder:
<connection-url>jdbc:mysql:mxj://localhost:3306/DB</connection-url>

connects via TCP/IP;

where:

<connection-url>jdbc:mysql:mxj://./DB</connection-url>
<connection-property 
name="socketFactory">com.mysql.jdbc.NamedPipeSocketFactory</connection-property>

would connect via named-pipe

This causes an error to occur when jBoss attempts to connect to mySQL.

Any insight on how to get named-pipe connections to work?

Thanks,


Dan

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967282#3967282

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967282
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to