Christoph (3) [Avatar] Offline
#1
Hey,

In section 9.2.2 you implenting a JSF process application using CDI.

I run the example on my jBoss AS 7 server and changed the database to an MySQL in the activit.cfg.xml.

Now, I trying to get data from a table with the EntityManager, but when i deploy the project to my jBoss I get an error.

How can I use the EntityManager or to get data from a table?

Thanks for your Help.
Christoph
licicin (41) [Avatar] Offline
#2
Re: Activiti CDI+JSF 2.0+EJB
try this

PreparedStatement statement = ((HibernateEntityManager)entityManager).getSession().connection().prepareStatement("SELECT * FROM act_hi_procinst");
ResultSet rs=statement.executeQuery();
tijs.rademakers (494) [Avatar] Offline
#3
Re: Activiti CDI+JSF 2.0+EJB
Hi,

And which data are you interested in? The raw data from the Activiti Engine tables or your own database tables?

Best regards,

Tijs
Christoph (3) [Avatar] Offline
#4
Re: Activiti CDI+JSF 2.0+EJB
@licicin
thx, i will try it this afternoon.

@tijs
I'm interesting in my own database tables. I insert my table in the activiti database.

I tried a test to find data in an table which i created, but at the deployment i get an error.

Can i use a persitence.xml to configure the database and also use the activiti-engine? I want to integrate one workflow in my webapplication.

Regards
christoph

Message was edited by:
Christoph
Christoph (3) [Avatar] Offline
#5
Re: Activiti CDI+JSF 2.0+EJB
Hey,

it was possible with the EntityManager.