-
1. Re: Redeployment of EJBs without redeployment of client?
javadocs Oct 28, 2002 4:09 PM (in response to stefan.wachter)Hi,
I am trying to do the same thing.
I deployed the EJB in ear and trying to access that EJB from a web component deployed in a different war file.
but I am getting the following eror..
org.jboss.docs.ExchangeRate.ExchangeRate not found in import
=======
<%@ page import="org.jboss.docs.ExchangeRate.ExchangeRate,
org.jboss.docs.ExchangeRate.ExchangeRateHome,
javax.ejb.*,
java.math.*,
javax.naming.*,
javax.rmi.PortableRemoteObject,
java.rmi.RemoteException"
%>
<%! private ExchangeRate exchange = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
Object objRef = ic.lookup("java:comp/env/ejb/ExchangeRate");
ExchangeRateHome home = (ExchangeRateHome)PortableRemoteObject.narrow(objRef, ExchangeRateHome.class);
exchange = home.create();
} catch (RemoteException ex) {
System.out.println("Couldn't create converter bean."+ ex.getMessage());
} catch (CreateException ex) {
System.out.println("Couldn't create converter bean."+ ex.getMessage());
} catch (NamingException ex) {
System.out.println("Unable to lookup home: "+ "TheConverter "+ ex.getMessage());
}
}
public void jspDestroy() {
exchange = null;
}
%>
=======
Please help me with how to access the EJB from a dierent archive.
-THanks
javadocs -
2. Re: Redeployment of EJBs without redeployment of client?
robbiest Nov 5, 2002 7:48 AM (in response to stefan.wachter)I had grief with something like this but my exception was to do with serial numbers, you probably know about these things anyway.
There is a unique security identifier generated for RMI client code and there's a tool that comes with JDK to find out what that number is; I think it's called serialver. Each time you compile your server code, you need to generate your client stubs otherwise they will refuse to talk to each other. I think you can force this identifier to be a fixed number - but this might encourage others to rearrange your client code. I didn't pursue fixing the serial versions but modified my ANT scripts instead to do the dog-work for me.