Ich habe einen Thread in meinem lokalen Weblogic-Server läuft einmal pro Tag, der versucht, eine Verbindung zu einer anderen Anwendung in einer anderen Weblogic herzustellen Server. Jedes Mal, wenn meine Methode ein Remote-Objekt erstellt und versucht, Remote-Methode i unten Ausnahme erhalten rufen
Ausnahme beim Verbinden von Weblogic-Server mit EJB - Ungültige Betreff: Prinzipale = [Weblogic, Administratoren]
[Sicherheit: 090398] Ungültige Betreff: Principals = [WebLogic, Administratoren]
Hier ist mein code:
Properties myEnv = new Properties();
myEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
myEnv.put(Context.PROVIDER_URL, "t3//123.345.234.123:1234");
myEnv.put(Context.SECURITY_PRINCIPAL, username);
myEnv.put(Context.SECURITY_CREDENTIALS, password);
InitialContext context;
Object lookupObj;
try {
context = new InitialContext(_contextEnv);
lookupObj = context.lookup("ejb.lookup.bean");
MyHome home = (MyHome) PortableRemoteObject.narrow(lookupObj, MyHome.class);
MyRemote remote =home.create();
if (null != context) {
try {
context.close();
}
catch (Exception e) {
//
}
}
return remote;
} catch (Exception e) {
e.printStackTrace();
}
Kann jemand sagen, was los ist?