Re: Looking up session beans between apps

2002-03-07 Thread Remy . Boucher

Hi,

try to put the remote and home interface of your bean in the app server
classpath ( server.xml ), i think it will solve your problem if Bean A and
Bean B are on the same server.

Does anybody know how to solve this problem if bean A and bean B are on
different server ??

Thanks.
Rémy.


 Gday all,
 
 I am currently working on porting an application
 from jboss to orion (don't ask!) and am
 having problems looking up session beans between apps.
 What i am trying to do is lookup sessionbeanA
 (in app A) from sessionbeanB (from app B).
 (Note that sessionbeanA and sessionbeanB are
 different bean classes). I am getting a class cast ecxception.
 
 This is how i am doing it
 
 So in sessionbeanB I create a context using the
 following properties..
 
 props.put( Context.INITIAL_CONTEXT_FACTORY,
 com.evermind.server.ApplicationClientInitialContextFactory );
 props.put( Context.PROVIDER_URL, ormi://localhost/sso-wa );
 props.put( Context.SECURITY_PRINCIPAL, guest );
 props.put( Context.SECURITY_CREDENTIALS,  );
 
 .. and can successfully locate an instance of sessionbeanA.
 Then i attempt to narrow it.
 The class i want to narrow to is SSOManagerHome.
 The class of the object being narrowed is
 SSOManagerHome_StatelessSessionHomeWrapper27
 It looks OK to me, but the narrow gives and exception. 
 
 java.lang.ClassCastException
 at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown
 Source)
 at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
 ..
 
 
 I have found some similar problems..
 http://www.elephantwalker.com/searchresult?id=277
 http://www.mail-archive.com/orion-interest@orionserver.com/msg17468.html
 But no solutions :(
 
 
 
 
 
 So where to from here??? Is there a solution? 
 Will the remote access doco
 http://www.orionserver.com/docs/remote-access/remote-access.xml
 be of any help as i am going session bean to session bean?
 (as opposed to web component to session bean).
 
 Thanks and Regards
 
 Ryan





A client calls several applications ?

2002-02-20 Thread Remy . Boucher

Hi,

I 'm using an orion application server on which is deployed 3 applications.
I've got a problem when a client try to use these applications.

The client call a bean of the first application, and after calls differents
beans  of the second application. There is sometime a problem during the
call to the second application. This problem is not systematic...

Let 's see the message : rulbok and acs are the name of my applications

On the client :

Exception passing by from remote server:
com.evermind.server.rmi.OrionRemoteException: Disconnected:
 Protocol error: invalid domain for this connection: rulbok
com.evermind.server.rmi.OrionRemoteException: Disconnected: Protocol error:
invalid domain for this
connection: rulbok
at
com.evermind.server.rmi.RMIConnection.disconnect(RMIConnection.java:1769)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:541)
at java.lang.Thread.run(Thread.java:539)


On the server :

Read command: 8
Read command: 25
Disconnected: Protocol error: invalid domain for this connection: acs
Disconnected: Protocol error: invalid domain for this connection: acs


What is very surprising is that the client  sometime continue and sometime
is frozen


Thanks for your help.

-- Rémy-- 






Re(2): Application client log in

2002-02-08 Thread Remy . Boucher

Hi, 

Thanks for this interesting code, but when i try it , i can't make a lookup
on the RoleManager :
 javax.naming.NameNotFoundException: java:comp/RoleManager not found

Is there something special to parameter in the app server ?

Thanks for your anwser.





 You use the rolemanager to do the login ... SECURITY_PRINCIPAL and 
 credentials can be the orion admin account.
  
  
 Hashtable env = new Hashtable();
 env.put(dedicated.connection,true);

env.put(java.naming.factory.initial,com.evermind.server.ApplicationClien
 tInitialContextFactory); 
 env.put(java.naming.provider.url,ormi://myhost/myapp); 
 env.put(javax.naming.Context.SECURITY_PRINCIPAL, 
 someuserwithrmiprivilages);// NOT the user you want to log in
 env.put(javax.naming.Context.SECURITY_CREDENTIALS,somepassword); 
 
 InitialContext initialcontext = new InitialContext(env);
 RoleManager rolemanager = 
 (RoleManager)initialcontext.lookup(java:comp/RoleManager);
 
 try
 {
 roleManager.login(username, password);
 }
 catch(Exception exception)
 {
 throw new SecurityException(exception.getMessage());
 }
  
 There is a lot of discussion about this in the archives and e.g. on the 
 Elephantwalkers site, as well as orionsupport and I think Atlassian.
 -Original Message-
 From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 8:22 AM
 To: Orion-Interest
 Subject: Application client log in
 
 
 We are currently implementing a Java Swing client, and I am wondering how 
 to write the log in system. When not using http or form based log in
(HTML) 
 and when you wish to let the client log in from a GUI interface (Swing), 
 which part of Orion is then used to hand over the username and password
for 
 authorization?
  
  
 Randahl