You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Jeff Faath (JIRA)" <ju...@ws.apache.org> on 2009/03/11 21:50:51 UTC
[jira] Commented: (JUDDI-166) Need review persistence.xml setup
[ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681021#action_12681021 ]
Jeff Faath commented on JUDDI-166:
----------------------------------
How about setting up a JNDI name for the data source in persistence.xml. Ex:
<jta-data-source>java:comp/env/jdbc/juddiDB</jta-data-source>
Then, at least for the web deployments, the connection information can be configured outside of the persistence file. In the META-INF directory of the web modules (cxf and axis) you can add a context.xml file like this (which will get auto-deployed):
<?xml version='1.0' encoding='utf-8'?>
<Context reloadable="false">
<!-- jUDDI data source -->
<Resource name="jdbc/juddiDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000" username="juddi" password="juddi"
driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true"/>
</Context>
That would make things work nicely for the web apps, but would break the unit tests too. Can a JNDI DataSource can be configured on the fly? Will hibernate/openjpa accept this setting when not operating within a container?
> Need review persistence.xml setup
> ---------------------------------
>
> Key: JUDDI-166
> URL: https://issues.apache.org/jira/browse/JUDDI-166
> Project: jUDDI
> Issue Type: Bug
> Reporter: Tom Cunningham
> Assignee: Kurt T Stam
> Fix For: 3.0beta
>
>
> Currently, our persistence.xml's are stored in juddi-core/src/main/resources/persistence. The user chooses the persistence framework they want using a property during the build :
> cd juddi-core
> mvn -Dpersistence=(hibernate|openjpa) clean install (where persistence= one of hibernate/openjpa)
> The persistence.xml then ends up in the built juddi-core.jar. Should we be shipping a persistence.xml inside of juddi-core.jar?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.