Hello,

step by step, I'm learning Tapestry 4.0.2 with Netbeans 5.5 ...
With that Netbeans version it's really easy to create persistence stuff. It makes pojo class and persistence unit with a wizard. Great.

I've test the persistence in a page property, by a very dirty fashion. But I know that it's working.

Here is the ugly code :

import org.apache.tapestry.html.BasePage ;
import javax.persistence.*; // implemented with TopLink
public abstract class DB01 extends BasePage
{
   EntityManagerFactory factory;
   EntityManager manager;
   public String getTest01()
   {
       factory = Persistence.createEntityManagerFactory("Tap02PU");
       manager = factory.createEntityManager();
       return "Ok, DB is connected" ;
   }
}

So, I come to you because your are so nice, that you will help me to initialize the EntityManager with Hivemind
;-)

Please can you tell me how to declare the serive ? There are so many things to learn : Form, Component, ... That I would like to not spend 2 days to find how to instantiate the EntityManager and how to access from pages.

Promess, in several days, I will digg into Hivemind documentation (I'll try to not use Spring but only Hivemind).

Thanks a lot
Cyrille



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to