You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Giampaolo Tomassoni (JIRA)" <ta...@jakarta.apache.org> on 2006/03/11 17:50:00 UTC

[jira] Created: (TAPESTRY-882) A JBoss EJB3 hivemind service

A JBoss EJB3 hivemind service
-----------------------------

         Key: TAPESTRY-882
         URL: http://issues.apache.org/jira/browse/TAPESTRY-882
     Project: Tapestry
        Type: Improvement
  Components: Contrib  
    Versions: 4.0    
 Environment: JBoss 4.0.4
    Reporter: Giampaolo Tomassoni
    Priority: Minor
 Attachments: Example.zip

I don't know if I just reinvented the weel, but I had no luck in finding a way to access my database by injection of a javax.persistence.EntityManager from Tapestry.

More specifically, I needed access from Tapestry to the javax.persistence.EntityManager instance that was supposed to be tied to my running thread. Also, since EJB3 persistence is implemented through Hibernate in JBoss and I prefer to use criteria queries instead of the EJB3 standard ones, sometimes I find useful to have access to the Hibernate Session instance overlooking my http request.

So, I developed a hivemind service for this purpose. I'm attaching its sources for two purposes:

 1) maybe someone finds it useful for his/her purposes. Of course, it may
    be eventually included in Tapestry as well;

 2) since I'm new to hivemind and all this "injection" era, I would like to
    have my code reviewed by someone more knowledgeable than me. This is to
    avoid going to use something that crashes down when the wind blows
    in a given way and the sun is at sunset and a big load is moved...

I named the hivemind service JbossEntityManagerFactory, but it yields either a javax.persistence.EntityManagerFactory or a (proxy) to a javax.persistence.EntityManager or org.hibernate.Session instance.

Of course, I put it in an examplar hive into the hivemind registry and the java packaging.

I'm looking for your suggestions and reviews.

Regards,


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


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


[jira] Updated: (TAPESTRY-882) A JBoss EJB3 hivemind service

Posted by "Giampaolo Tomassoni (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-882?page=all ]

Giampaolo Tomassoni updated TAPESTRY-882:
-----------------------------------------

    Attachment: Example.zip

> A JBoss EJB3 hivemind service
> -----------------------------
>
>          Key: TAPESTRY-882
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-882
>      Project: Tapestry
>         Type: Improvement
>   Components: Contrib
>     Versions: 4.0
>  Environment: JBoss 4.0.4
>     Reporter: Giampaolo Tomassoni
>     Priority: Minor
>  Attachments: Example.zip
>
> I don't know if I just reinvented the weel, but I had no luck in finding a way to access my database by injection of a javax.persistence.EntityManager from Tapestry.
> More specifically, I needed access from Tapestry to the javax.persistence.EntityManager instance that was supposed to be tied to my running thread. Also, since EJB3 persistence is implemented through Hibernate in JBoss and I prefer to use criteria queries instead of the EJB3 standard ones, sometimes I find useful to have access to the Hibernate Session instance overlooking my http request.
> So, I developed a hivemind service for this purpose. I'm attaching its sources for two purposes:
>  1) maybe someone finds it useful for his/her purposes. Of course, it may
>     be eventually included in Tapestry as well;
>  2) since I'm new to hivemind and all this "injection" era, I would like to
>     have my code reviewed by someone more knowledgeable than me. This is to
>     avoid going to use something that crashes down when the wind blows
>     in a given way and the sun is at sunset and a big load is moved...
> I named the hivemind service JbossEntityManagerFactory, but it yields either a javax.persistence.EntityManagerFactory or a (proxy) to a javax.persistence.EntityManager or org.hibernate.Session instance.
> Of course, I put it in an examplar hive into the hivemind registry and the java packaging.
> I'm looking for your suggestions and reviews.
> Regards,

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


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


[jira] Resolved: (TAPESTRY-882) A JBoss EJB3 hivemind service

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-882?page=all ]
     
Jesse Kuhnert resolved TAPESTRY-882:
------------------------------------

    Resolution: Won't Fix

It's great to see more people using tapestry for different things, but I think this one in particular would be better served going into one of the hivemind sub-projects. There are two core projects that I know of:

http://hivetranse.sourceforge.net/
http://honeycomb.javaforge.com 

I would try hitting those projects up to see where you might contribute your utiltities. Keep up the good work!


> A JBoss EJB3 hivemind service
> -----------------------------
>
>          Key: TAPESTRY-882
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-882
>      Project: Tapestry
>         Type: Improvement
>   Components: Contrib
>     Versions: 4.0
>  Environment: JBoss 4.0.4
>     Reporter: Giampaolo Tomassoni
>     Priority: Minor
>  Attachments: Example.zip
>
> I don't know if I just reinvented the weel, but I had no luck in finding a way to access my database by injection of a javax.persistence.EntityManager from Tapestry.
> More specifically, I needed access from Tapestry to the javax.persistence.EntityManager instance that was supposed to be tied to my running thread. Also, since EJB3 persistence is implemented through Hibernate in JBoss and I prefer to use criteria queries instead of the EJB3 standard ones, sometimes I find useful to have access to the Hibernate Session instance overlooking my http request.
> So, I developed a hivemind service for this purpose. I'm attaching its sources for two purposes:
>  1) maybe someone finds it useful for his/her purposes. Of course, it may
>     be eventually included in Tapestry as well;
>  2) since I'm new to hivemind and all this "injection" era, I would like to
>     have my code reviewed by someone more knowledgeable than me. This is to
>     avoid going to use something that crashes down when the wind blows
>     in a given way and the sun is at sunset and a big load is moved...
> I named the hivemind service JbossEntityManagerFactory, but it yields either a javax.persistence.EntityManagerFactory or a (proxy) to a javax.persistence.EntityManager or org.hibernate.Session instance.
> Of course, I put it in an examplar hive into the hivemind registry and the java packaging.
> I'm looking for your suggestions and reviews.
> Regards,

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


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


[jira] Commented: (TAPESTRY-882) A JBoss EJB3 hivemind service

Posted by "Giampaolo Tomassoni (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-882?page=comments#action_12370021 ] 

Giampaolo Tomassoni commented on TAPESTRY-882:
----------------------------------------------

Thank you Jesse: I didn't even know of these frameworks.

I see, however, that none of the projects you pointed out are dealing with EJB3. But I understand that submitting stuff like mine to the hivemind project would probably fit better the project scope. After all, my JbossEntityManagerFactory is not that different in purpose from the hivemind's EJBProxyFactory.

Thanks.

> A JBoss EJB3 hivemind service
> -----------------------------
>
>          Key: TAPESTRY-882
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-882
>      Project: Tapestry
>         Type: Improvement
>   Components: Contrib
>     Versions: 4.0
>  Environment: JBoss 4.0.4
>     Reporter: Giampaolo Tomassoni
>     Priority: Minor
>  Attachments: Example.zip
>
> I don't know if I just reinvented the weel, but I had no luck in finding a way to access my database by injection of a javax.persistence.EntityManager from Tapestry.
> More specifically, I needed access from Tapestry to the javax.persistence.EntityManager instance that was supposed to be tied to my running thread. Also, since EJB3 persistence is implemented through Hibernate in JBoss and I prefer to use criteria queries instead of the EJB3 standard ones, sometimes I find useful to have access to the Hibernate Session instance overlooking my http request.
> So, I developed a hivemind service for this purpose. I'm attaching its sources for two purposes:
>  1) maybe someone finds it useful for his/her purposes. Of course, it may
>     be eventually included in Tapestry as well;
>  2) since I'm new to hivemind and all this "injection" era, I would like to
>     have my code reviewed by someone more knowledgeable than me. This is to
>     avoid going to use something that crashes down when the wind blows
>     in a given way and the sun is at sunset and a big load is moved...
> I named the hivemind service JbossEntityManagerFactory, but it yields either a javax.persistence.EntityManagerFactory or a (proxy) to a javax.persistence.EntityManager or org.hibernate.Session instance.
> Of course, I put it in an examplar hive into the hivemind registry and the java packaging.
> I'm looking for your suggestions and reviews.
> Regards,

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


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