Hello,
I'm new to EE programming and Glassfish usage. Im currently using version 2.1 due to clustering support. I managed to create a simple application based upon Stripes+EJB3+Hibernate+MySQL. It prompts the user to input a name and lastname, creates a Person object and stores it in a table of the database.
The cluster is done with 2 nodeagents in 2 different machines with their relative instances. In the DAS i see correctly the instances up, running and connected.
The database is installed on the machine 1, the same running DAS. In the DAS i have created a Connection Pool named MySQLPool, with the parameters necessary to connect to the db
The application runs fine as Stand Alone but has problems in Cluster: while Instance 1 successfully stores the data, Instance 2 doesn't work: if i don't mark the app as distributable, it tries to find a database in machine 2. Marked as distributable with transaction-type="JTA", fails to resolve the UserTransaction in jndi.
I am thinking that all the problems I have come from a badly configured deployment. I cant understand which are the different deployment descriptor settings to achieve different goals:
1) [b]SCENARIO 1: I want to use the DAS machine also as database machine [/b]. Instance 2 must write to database running on machine 1. In this case i obtain an architecture with distributed WAR+EJB layers, while i centralize only the database.
2) [b]SCENARIO 2: I want to share the ejb classes of the application[/b]. Instance 2 must lookup at the Ejbs running on Instance 1. In this case i obtain an architecture with distributed WAR layer, while i centralize the EJB layer and the database.
I have tried to google the problems but probably i can't see where to find good answers, even the documentation of Glassfish is often cryptic to a newcomer like me.
Is there any resource (tutorial, example…) to understand the usage of deployment descriptors in the 2 different scenarios that I want to test?
any help is welcome, since I'm actually stuck.
Mirko
[Message sent by forum member 'bluedogmilan' (mirko.migliorati_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=377785