[jboss-user] [EJB 3.0] - Distributed application

vphagura do-not-reply at jboss.com
Sat May 9 13:17:39 EDT 2009


I have to deploy a WAR called as reservation.war and an EAR called as reservation.ear on two jboss on two different machines. 

The java classes in the WAR, on one machine, accesses EJB3 remotely in the EAR on the other machine. And, also it need to access the EntityBeans as they are the value objects. For example;

In the EAR I have:

@Remote
public interface FlightReservationAccessorRemote
{
       public Flight findByFlightNumber(...);
       ...
}

Of course, there is a Stateless Bean which implements the above interface.

@Stateless
public class FlightReservationAccessorBean implements FilghtReservationAccessorRemote
{
...
}

The EntityBean looks like this:

@Entity
public class Flight implements Serializable
{
     Integer Id = 0;
     String flightNumber = null;
    ....
}


Now, I package the Interfaces and the Entity beans in a sperate jar called as common.jar and drop it in the deploy dir along with the reservation.ear. And, I specify this in my persistence.xml file as:

....
<jar-file>../common.jar</jar-file>

The question is; can I take the same common.jar from this deployment and drop it on the other machine's  jboss ../server/default/lib and also package the common.jar in the WEB-INF/lib in the WAR, for my WAR java classes to access the  interface and call the EJB3s remotely?? 

Or am I missing something. Thx in adv.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229861#4229861

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229861



More information about the jboss-user mailing list