I can precise that I'm using tomee embedded. Do I have anything to do for "tome/ejb" context ?
From: Yann BLAZART Sent: jeudi 10 septembre 2015 17:27 To: '[email protected]' Subject: RE: TomEE EJB remote My bad... I had < java :global/... > in my lokkup. But removing it, I have another error : WARNING: RequestFailed{server=http://192.168.56.1:33001/tomee/ejb} JNDI_LOOKUP:/global/power-extractsource/DirectoryLocalEJB!com.bnpparibas.eqd.feeds2.commons.common.directory.DirectoryServiceRemote {error=Cannot open input stream to server: } sept. 10, 2015 5:24:26 PM com.vaadin.server.DefaultErrorHandler doDefault SEVERE: org.apache.openejb.client.ClientRuntimeException: Invalid response from server: -1 From: Yann BLAZART Sent: jeudi 10 septembre 2015 17:13 To: [email protected]<mailto:[email protected]> Subject: TomEE EJB remote Hello ! I'm trying to use remote EJB from TomEE to TomEE. But it doesn't work as expected. In fact it's seems that in real it's connecting "locally" : With this code, I get values from local tome not the remote one. But port is ok.... // remote call to status. Properties p = new Properties(); p.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory"); p.put("java.naming.provider.url", "http://" + card.getIpAdress() + ":" + card.getRemotePort() + "/tomee/ejb"); InitialContext ctx; if (card.getRemotePort() == 33001) { try { ctx = new InitialContext(p); ctx.lookup("java:global"); System.out.println(":::: GLOBAL !"); NamingEnumeration<NameClassPair> list = ctx.list("java:global"); while (list.hasMore()) { System.out.println("**** Java global ::"+list.next().getName()); // Here I see values that exists in the local tome, not the remote // the 'local ' run on port 33000 and th remote on 33001 } } catch (NamingException ex) { java.util.logging.Logger.getLogger(MainUI.class.getName()).log(Level.SEVERE, null, ex); } This message and any attachments (the "message") is intended solely for the intended addressees and is confidential. If you receive this message in error,or are not the intended recipient(s), please delete it and any copies from your systems and immediately notify the sender. Any unauthorized view, use that does not comply with its purpose, dissemination or disclosure, either whole or partial, is prohibited. Since the internet cannot guarantee the integrity of this message which may not be reliable, BNP PARIBAS (and its subsidiaries) shall not be liable for the message if modified, changed or falsified. Do not print this message unless it is necessary,consider the environment. ---------------------------------------------------------------------------------------------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur ou s'il ne vous est pas destine, merci de le detruire ainsi que toute copie de votre systeme et d'en avertir immediatement l'expediteur. Toute lecture non autorisee, toute utilisation de ce message qui n'est pas conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite. L'Internet ne permettant pas d'assurer l'integrite de ce message electronique susceptible d'alteration, BNP Paribas (et ses filiales) decline(nt) toute responsabilite au titre de ce message dans l'hypothese ou il aurait ete modifie, deforme ou falsifie. N'imprimez ce message que si necessaire, pensez a l'environnement.
