XNJS and MySQL

View: New views
2 Messages — Rating Filter:   Alert me  

XNJS and MySQL

by Clement COUSSIRAT :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm working on the XNJS and I would store its persistence data in a
MySQL database.
de.fzj.unicore.xnjs.persistence.HsqldbActionStoreFatory is deprecated so
I conclude that the good way to implement MySQL support is to add it in
JDBCActionStore.
I modified JDBCActionStore.doInit() with lines like that:
"getConfiguration().setProperty(ConfigurationSource.DB_HOST, param);"
But when "PersistenceFactory.get().getPersist();" is called, it's an
HSQLPersist object which is created instead of MySQLPersist.

I have found in PersistenceFactory.getPersistClass() line 90 HSQLPersist
hard coded.
I don't know if it's a bug or if I missed something.  


Regards,
Clément Coussirat


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Unicore-devel mailing list
Unicore-devel@...
https://lists.sourceforge.net/lists/listinfo/unicore-devel

Re: XNJS and MySQL

by Bernd Schuller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi Clément,

for the XNJS it is simple to add MySQL since it already is
supported :)

It is "just" a matter of configuration.

In the xnjs.xml you need to set some properties:

 <!-- make XNJS use MySQL for persistence -->
 <eng:Property name="JDBCActionStore.class"
               value="de.fzj.unicore.persist.impl.MySQLPersist"/>

 <!-- MySQL server credentials -->
 <eng:Property name="persistence.user.JOBS"
               value="unicore"/>
 <eng:Property name="persistence.password.JOBS"
               value="SecretDBPassword"/>
 <!-- server host/port setting -->
 <eng:Property name="persistence.host.JOBS"
               value="localhost"/>
 <eng:Property name="persistence.port.JOBS"
               value="3306"/>


However, while writing this I noted a bug :-) which
affects the host/port setting. I'll fix this for the upcoming 6.2.2
release of course. the current release will only work if you do NOT set
host/port, and the server uses the default localhost:3306.

If you're interested in the code, the XNJS uses a module called
"persistence", which you can find on the SVN at
http://unicore.svn.sourceforge.net/viewvc/unicore/persistence/trunk/


Let me know if you have further questions! You might find that the
persistence code in UNICORE is somewhat fragmented, we still have a task
to unify it (so that it all uses the "persistence" module).

Best regards,
Bernd.

On Di, 2009-09-15 at 14:30 +0200, Clement COUSSIRAT wrote:

> Hello,
>
> I'm working on the XNJS and I would store its persistence data in a
> MySQL database.
> de.fzj.unicore.xnjs.persistence.HsqldbActionStoreFatory is deprecated so
> I conclude that the good way to implement MySQL support is to add it in
> JDBCActionStore.
> I modified JDBCActionStore.doInit() with lines like that:
> "getConfiguration().setProperty(ConfigurationSource.DB_HOST, param);"
> But when "PersistenceFactory.get().getPersist();" is called, it's an
> HSQLPersist object which is created instead of MySQLPersist.
>
> I have found in PersistenceFactory.getPersistClass() line 90 HSQLPersist
> hard coded.
> I don't know if it's a bug or if I missed something.
>
>
> Regards,
> Clément Coussirat
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Unicore-devel mailing list
> Unicore-devel@...
> https://lists.sourceforge.net/lists/listinfo/unicore-devel
--
Dr. Bernd Schuller
Distributed Systems and Grid Computing
Juelich Supercomputing Centre, http://www.fz-juelich.de/jsc
Phone: +49 246161-8736 (fax -8556)
Personal blog: www.jroller.com/page/gridhaus


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Unicore-devel mailing list
Unicore-devel@...
https://lists.sourceforge.net/lists/listinfo/unicore-devel