Bonjour,
Voilà mon problème :
J'ai une application java qui tourne sur Tomcat 5.0 qui doit faire appel à un EJB. Mon EJB se trouve sur Weblogic 8.1 sp5.
Quand j'essaie d'accéder à mon ejb, j'ai un plantage sur le lookup :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2Le Nom ejb n'est pas lié à ce Contexte.
Voici le morceau de code qui me parait important :
Pour info, j'ai essayé de changer la valeur ejb/Initialisation avec ce que j'ai trouvé sur le net, mais le message reste le même, même avec java:comp/env/ejb/Initialisation.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 /** * Initialise le contexte */ protected Context getInitialContext() throws Exception { Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); props.put(Context.PROVIDER_URL, "t3://<adress_machine_weblo>:<port_console_weblo>"); Context ctx = new InitialContext(); return ctx; } /** * Récupère l'interface Home */ protected InitialisationHome getHome() throws Exception { Context ctx = this.getInitialContext(); Object o = ctx.lookup("ejb/Initialisation"); InitialisationHome intf = (InitialisationHome) PortableRemoteObject.narrow(o, InitialisationHome.class); return intf; }
Quelqu'un aurait-il une idée de ce qui ne va pas ?
Merci d'avance !
Partager