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:
public interface FlightReservationAccessorRemote
public Flight findByFlightNumber(...);
Of course, there is a Stateless Bean which implements the above interface.
public class FlightReservationAccessorBean implements FilghtReservationAccessorRemote
The EntityBean looks like this:
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:
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.