users@glassfish.java.net

Deployment descriptors for different scenarios

From: bluedogmilan <mirko.migliorati_at_gmail.com>
Date: Mon, 21 Dec 2009 01:23:21 -0800 (PST)

Hello,
I'm new to EE programming and Glassfish usage. 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 and running
in the cluster.

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.

Now, I have problems to understand which are the different deployment
descriptor settings to achieve different goals:

1) SCENARIO 1: I want to use the DAS machine also as database machine.
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) SCENARIO 2: I want to share the ejb classes of the application. 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
-- 
View this message in context: http://old.nabble.com/Deployment-descriptors-for-different-scenarios-tp26871576p26871576.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.