You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Mike D Pilsbury (JIRA)" <de...@tapestry.apache.org> on 2007/03/17 22:03:09 UTC

[jira] Created: (TAPESTRY-1372) Need a way to override hibernate properties.

Need a way to override hibernate properties.
--------------------------------------------

                 Key: TAPESTRY-1372
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
             Project: Tapestry
          Issue Type: Improvement
          Components: tapestry-hibernate
    Affects Versions: 5.0.3
            Reporter: Mike D Pilsbury
            Priority: Minor


There is no way to configure the Configuration before it is used to create the SessionFactory.

I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,

Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-1372:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Howard M. Lewis Ship
>         Attachments: patch-r547489-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507005 ] 

Dan Adams commented on TAPESTRY-1372:
-------------------------------------

Also, a note about the first patch: I'm accepting the license agreement even though it says i didn't. It says that because I attached it through mylar and the option doesn't exist there.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Howard M. Lewis Ship
>         Attachments: patch-r547489-configurer-contributions.txt, patch-r548175-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams updated TAPESTRY-1372:
--------------------------------

    Attachment: patch-r548175-configurer-contributions.txt

Here's another attempt at creating the patch after updating. I think you should still try and use the first patch as I had some weirdness creating this one.

Some problems you may have hit with the first one:
- i'm using eclipse
- i checked out the tapestry-hibernate module as it's own project called "tapestry-hibernate2" because i already had another copy of it for another patch. So you should apply the patch directly to tapestry-hiberate at the level that it gets rid of the tapestry-hibernate2

so I would suggest trying the first one again and then maybe this one.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Howard M. Lewis Ship
>         Attachments: patch-r547489-configurer-contributions.txt, patch-r548175-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Resolved: (TAPESTRY-1372) Allow contributions to the Hibernate Configuration

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams resolved TAPESTRY-1372.
---------------------------------

    Resolution: Fixed

> Allow contributions to the Hibernate Configuration
> --------------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Dan Adams
>             Fix For: 5.0.6
>
>         Attachments: patch-r547489-configurer-contributions.txt, patch-r548175-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams updated TAPESTRY-1372:
--------------------------------

    Priority: Major  (was: Minor)

I'm raising the priority because this feature is actually pretty crucial to something I need to do with this. I think that the module needs to be fairly robust or else I'm going to have to do something like duplicate it into my project to make the necessary features available which I don't want to do.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams reassigned TAPESTRY-1372:
-----------------------------------

    Assignee: Dan Adams  (was: Howard M. Lewis Ship)

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Dan Adams
>         Attachments: patch-r547489-configurer-contributions.txt, patch-r548175-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506971 ] 

Dan Adams commented on TAPESTRY-1372:
-------------------------------------

Where are the conflicts? I created the patch against revision 547489. I can try and apply the patch myself and then update and make a new one later this afternoon.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Howard M. Lewis Ship
>         Attachments: patch-r547489-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams updated TAPESTRY-1372:
--------------------------------

    Attachment: patch-r547489-configurer-contributions.txt

I attached a patch that adds a pipleline filter for adding contributions that modify the hibernate configuration before the session factory is created. This should allow both the adding of properties as well as more complicated things like adding event handlers. I also moved the default configuration of calling Configuration.configure() and adding the entity packages based on contributed package names out to separate classes that are then contributed by HibernateModule. How hibernate is configured is now very configurable and the session source that creates the session factory is now very lightweight.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>         Attachments: patch-r547489-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503416 ] 

Dan Adams commented on TAPESTRY-1372:
-------------------------------------

I was actually going to put in an enhancement ticket requesting more or less the same thing but for a different reason; I need access to the configuration before the session factory is created in order to do things like adding hibernate event listeners. In general I think it makes sense for configuration of the session factory to be distributed just as contributing entities and entity packages is.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Priority: Minor
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1372) Allow contributions to the Hibernate Configuration

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams updated TAPESTRY-1372:
--------------------------------

    Fix Version/s: 5.0.6
          Summary: Allow contributions to the Hibernate Configuration  (was: Need a way to override hibernate properties.)

> Allow contributions to the Hibernate Configuration
> --------------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Dan Adams
>             Fix For: 5.0.6
>
>         Attachments: patch-r547489-configurer-contributions.txt, patch-r548175-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506948 ] 

Howard M. Lewis Ship commented on TAPESTRY-1372:
------------------------------------------------

I'd like to apply the patch, but it doesn't apply cleanly ... even after adjusting imports, there seems to be some missing stuff.  Was the patch made from an earlier version of the code? Can a new patch be created?

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Howard M. Lewis Ship
>         Attachments: patch-r547489-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-1372) Allow contributions to the Hibernate Configuration

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Adams closed TAPESTRY-1372.
-------------------------------


Housekeeping.

> Allow contributions to the Hibernate Configuration
> --------------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>            Assignee: Dan Adams
>             Fix For: 5.0.6
>
>         Attachments: patch-r547489-configurer-contributions.txt, patch-r548175-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1372) Need a way to override hibernate properties.

Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505360 ] 

Dan Adams commented on TAPESTRY-1372:
-------------------------------------

I alternate way to do it other than the way my patch does it that I think might be better would be to use only HibernateConfigurer instances rather than having a configuration specifically for packages. Rather we could have a facade class with factory methods for creating instances for adding packages, entities, etc.

> Need a way to override hibernate properties.
> --------------------------------------------
>
>                 Key: TAPESTRY-1372
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1372
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.3
>            Reporter: Mike D Pilsbury
>         Attachments: patch-r547489-configurer-contributions.txt
>
>
> There is no way to configure the Configuration before it is used to create the SessionFactory.
> I ran in to this problem because I need to override the connection url, user and password properties in test cases (so that  an in-memory HSQLDB database can be used). I am sure that there will be other scenarios where properties will need to be overriden at run time,
> Access to the Configuration object might not be sensible. An alternative would be the ability to provide names and values that are then set in the Configuration before SessionFactory creation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org