Artemis Entreri
2011.08.10
|
|
0 0
5568
|
Egy példa, remote EJB hívásra:
Szerver oldal:
@Remote public interface IRemoteBean { String getMessage(); }
@Stateless(mappendName="AkarmiBean")
public class RemoteBean implements IRemoteBean { public String getMessage() { return "Message"; } }
És a hívó kód:
public class Main { public static void main(String[] args) throws Exception {
InitialContext ctx = new InitialContext(); IRemoteBean rb = (IRemoteBean)ctx.lookup("AkarmiBean"); System.out.println("================================="); System.out.println("EJB message :" + br.getMessage()); System.err.println("================================="); } }
|
Előzmény: bigzed (5567)
|
|