I am trying to find EJB from a standalone Java application. I mean WebSphere Application Server 6.1, but if someone knows how to do this for another application server, this may lead me in the right direction.
What I am doing now:
initialContext= new InitialContext(env);
initialContext.lookup("");
lc = new LoginContext("WSLogin", new WSCallbackHandlerImpl("wasadmin", "defaultWIMFileBasedRealm", "wasadmin"));
lc.login();
subject = lc.getSubject();
WSSubject.setRunAsSubject(subject);
This does not work ... my object is still "/ UNAUTHENTICATED" and I get an error message when I try to find the EJB. I also specify the following parameters for VM when running the application:
-Dcom.ibm.CORBA.ConfigURL = "C: \ was \ profiles \ AppSrv01 \ properties \ sas.client.props" -Djava.security.auth.login.config = "C: \ was \ profiles \ AppSrv01 \ properties \ wsjaas_client.conf "
Hillgod