Scienze  
Syllabus ItalianoSyllabus IngleseindexlogoutArea Personale UNITN
Sistemi distribuiti: design Forum del Corso Messaggi del Thread
 
Sistemi distribuiti: design - Forum del Corso
Messaggi del Thread

Autore Messaggio
stefano.bortoli
Thread
  Post Postato: 31 gennaio 2006
   Titolo: RMI administration application
 

Hi all!

I have a little architectural problem. I have developed the main part of the web application...and now I'm thinking about the RMI client that should perform the administration task.

I have defined a stateless session bean facade that allow to access all the administration methods. 

I think that the RMI client application shouldn't access directly to a stateless sessionbean...(because I should copy in some way the session facade interface to the client)...(is it wrong?) and so I have defined a remote delegate class (with interface) that allow the "forwarding" of the invokations to the session facade. my doubt now is where and when create the instance of the remote delegate in the  server application. 

I have fear that if I create it during the web application initialization I have a mistake from  an architectural point of view because I may allow web designer to access the administration methods...so. do you have some idea?
afogarolli
  Post Postato: 31 gennaio 2006
   Titolo: Re: RMI administration application
 

hi!
you should instanciate the delegate or the session facade when you initialize your rmi client. If the client is a standalone non web application why you are thinking to put the related logic in the web part, it doesn't make sense.
Bye.
Angela.
stefano.bortoli
  Post Postato: 1 febbraio 2006
   Titolo: Re: RMI administration application
 

ok. If I have understand correctly I have only to manage the RMI "server" application as a different "component" into the application with different "start-up" path. in other word: if I want to access the administration methods I should start the RMI server application  separately respect the web application. It seem correct... and during the past night I have thought about it...Thanks!
afogarolli
  Post Postato: 1 febbraio 2006
   Titolo: Re: RMI administration application
 

Exactly!
the client part is a separate component of the application, usally it doesn't even run on  the application server machine.
You use a service locator + home factory pattern to connect to the ejb module.
Your first guess about architectural patterns was almost right but not clear enough I suggest you to indagate deeper when to use delegate or just a session facade...
bye
stefano.bortoli
  Post Postato: 1 febbraio 2006
   Titolo: Re: RMI administration application
 

The RMI client is a different application...untill here there is no problem. but your answer give me some doubt:
what about the RMI server? can I use a Stateless Session Facade as interface for RMI server interface?

I think that is better if I don't use it directly so I have created a class RemoteDelegate and its interface RemoteDelegateInterface that foreward the request to the Stateless Session Facade preposed for this. this hide to the remote client the facade management policy. is it wrong? 

the architectural problem was related to the fact that I did not know where create the instance of the RemoteDelegate class. Now I start the name binding and create the reagistry autonomously respect the web application. I hope this is a good solution...
afogarolli
  Post Postato: 1 febbraio 2006
   Titolo: Re: RMI administration application
 

The solution of your choice is correct, but you could also call directly the facade. It's your choice, for each pattern there is advantages and drawbacks, depends on the context, just learn how to  explain your choices.
BTW you don't need an rmi server, the application server gives you that feature, you call server componets through jndi service.
Bye

stefano.bortoli
  Post Postato: 1 febbraio 2006
   Titolo: Re: RMI administration application
 

thanks a lot. I wasn't sure about the facade... probably the best choice is ask before act... 
 
Progetto eLeaf
Contact eLeaf team