A saw for the switch back. I readed the code in fact.

I had to remove "java:", but now I have 
org.apache.openejb.client.ClientRuntimeException: Invalid response  from 
server: -1

The client and server are the same version, TomEE embedded each. Do embedded 
TomEE is EJB remote enabled ?

I tried to use Hessian, as I readed in your blog. But impossible to make the 
service start, the CDI ext is ok, but not the service.

When I launch my code with a maven tome:run, it's working well.

-----Original Message-----
From: Romain Manni-Bucau [mailto:[email protected]] 
Sent: jeudi 10 septembre 2015 23:37
To: [email protected]
Subject: Re: TomEE EJB remote

Hi Yann,

RemoteInitialContextFactory is able to switch back to local lookup if the bean 
is local but doesnt seem your case. Things I'd check:

- lookup on global/xxx and not java:global/xxx - in some setup java: naming has 
no fallback, can likely be the case in embedded mode since it is a JVM wide 
config
- ensure openejb-client version is the same as openejb-ejbd server one



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog 
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | 
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber 
<http://www.tomitribe.com>

2015-09-10 8:32 GMT-07:00 Yann BLAZART <[email protected]>
:

> 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.bnpparib
> as.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.S
> EVERE,
> 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.
>

Reply via email to