You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Tom Cunningham (JIRA)" <ju...@ws.apache.org> on 2008/12/12 18:16:46 UTC

[jira] Created: (JUDDI-166) Need review persistence.xml setup

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.0


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.


[jira] Updated: (JUDDI-166) Need review persistence.xml setup

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt T Stam updated JUDDI-166:
------------------------------

    Fix Version/s:     (was: 3.0)
                   3.0beta

> 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.


[jira] Resolved: (JUDDI-166) Need review persistence.xml setup

Posted by "Tom Cunningham (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Cunningham resolved JUDDI-166.
----------------------------------

    Resolution: Fixed

hibernate and openjpa both now have persistence.xml's in WEB-INF/classes/META-INF, and there is a context.xml in META-INF that contains the data source being used (derby by default).       The nice thing about doing it this way is that everything is uncompressed in our tomcat bundle, so the user does not have to edit the persistence.xml in the WAR.

> 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: Tom Cunningham
>             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.


[jira] Assigned: (JUDDI-166) Need review persistence.xml setup

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt T Stam reassigned JUDDI-166:
---------------------------------

    Assignee: Tom Cunningham  (was: Kurt T Stam)

> 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: Tom Cunningham
>             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.


[jira] Commented: (JUDDI-166) Need review persistence.xml setup

Posted by "Tom Cunningham (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689933#action_12689933 ] 

Tom Cunningham commented on JUDDI-166:
--------------------------------------

Removed all of the properties from the hibernate/openjpa persistence files that we use for testing and added them to a pom.     I would like to find a way to pass them in from the pom -> maven surefire system properties through a properties file, but the maven surefire plugin only seems to support passing string values, not variables such as
${juddi.hibernate.maxRows}.    

I've added a step into the juddi-core pom which then subsequently removes the persistence.xml post-test but pre-package, which should ensure that the persistence.xml is not put into the jar.

> 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: Tom Cunningham
>             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.


[jira] Commented: (JUDDI-166) Need review persistence.xml setup

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675163#action_12675163 ] 

Kurt T Stam commented on JUDDI-166:
-----------------------------------

I think we should be shipping the persistence.xml in the juddi.war/WEB-INF/classes/META-INF/persistence.xml.
That way users don't have to break open the jar when they want to configure their database.

This will break the unittests, but we should try setting it in maven (see the link above).

> 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.


[jira] Closed: (JUDDI-166) Need review persistence.xml setup

Posted by "Tom Cunningham (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Cunningham closed JUDDI-166.
--------------------------------


> 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: Tom Cunningham
>             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.


[jira] Commented: (JUDDI-166) Need review persistence.xml setup

Posted by "Jeff Faath (JIRA)" <ju...@ws.apache.org>.
    [ 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.


[jira] Commented: (JUDDI-166) Need review persistence.xml setup

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671486#action_12671486 ] 

Kurt T Stam commented on JUDDI-166:
-----------------------------------

This maybe helpful, it shows how to pass settings in through system properties in maven.

http://svn.apache.org/repos/asf/openjpa/tags/0.9.7-incubating/openjpa-persistence-jdbc/pom.xml

> 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.