[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1428) PersistenceManager Pattern (request for comments)

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:00:40 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-1428.
-------------------------------


Closing stale resolved issues

> PersistenceManager Pattern (request for comments)
> -------------------------------------------------
>
>                 Key: HHH-1428
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1428
>             Project: Hibernate Core
>          Issue Type: New Feature
>         Environment: Thats the idea! Unknown db platform
>            Reporter: Harold Eduardo Montoya
>
> Well, I am not sure if I am goint to tell you some stupid ideas. I apologize for that.
> Talking about Persistence we cannot limit ourselves to proper RDBMS's or other systems with proper JDBC drivers and proper structured query languages dialects. Hibernate is hot, but as a programmer i hav had to build a custom interface in order to hide Hibernate implementation because i wanted to use a unique PersistenceManager interface for persisting objects in any way. My first problem was when i wanted to persist dynabeans, but now there is some development activity in that sense. My main problem now was when i wanted to use the same PersistenceManager interface for a custom system with no JDBC drivers nor SQL dialect!
> I will try to explain a very simple scenario!
> /*
>  * PersistenceManager Pattern
>  */
> import org.persistence.PersistenceManagerFactory;
> import org.persistence.PersistenceManager;
> {
>     PersistenceManagerFactory pmf = new PersistenceManagerFactory();
>     /*
>      * This step can be done through an xml config file parsed by digester
>      * so we can also configurate the Persistence Manager in order to
>      * set custom properties that does not belong to the PersistenceManager interface.
>      */
>     PersistenceManager pm = pmf.getPersistenceManager("org.persistence.HibernatePersistenceManager");
>     /*
>      * Some custom code that depends on the PersistenceManager implementation
>      */
>     pm.init();
>     MyBean object = new MyBean();
>     object.setName("pippo");
>     object.setWhatever("whenever");
>     pm.persist(object);
> }
> So, the init() and persist() implementation depends on your needs.
> JDBC? use current SessionFactory()
> EXOTIC SOCKET CONNECTION? implement your own exotic PersistenceManager
> EXOTIC TIBCO CONNECTION with XML messaging? implement your own ....
> and so on...
> Well, I hope you will at least read these comments and consider to write
> at least your opinion. I can accept an "it sucks..." as an opinion!
> thanks for your time!
> Cheers!
> Eduardo

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list