I am having some problems devoloping an application based on EJB 3 technology.
I would like to use a Facade Pattern in the Session beans to decouple my client (a web application) from my Entity Beans.
I am using a SFSB to manage the user session.
So I have a FacadeLoginRemote
remote interface, which exposes to the client the methods doLogin()
, doLogout()
, etc...
Currently this SFSB also includes some other methods such as getCourse(int id)
, getResource(int id)
. Not all the users can actually get the course and get the resource, so the Facade perform some checks before returning the values to the client.
I would like to split the Facade, putting the methods getCourse()
and getResource()
in a special class for them, but leaving to the FacadeLoginRemote
the functions of checking users privileges.
If I make some different SLSBs I will expose them to the client. So the client would have the possibility to connect directly to them avoiding checks from the FacadeLoginRemote
.
Am I wrong? Is there any way to do this?
Thanks in advance,
Andrea