Is there a way to do that? To use dynamic EJB connections?

Hello Developers,
I have developed a security web application using EJB,
Jaas with customer provider
I used DBSystemLogin module
I want to fined a way that the EJB connection change each time when the user login.
I used the HR as the main schema.
I created three schemas that I want to use them as users:
-Lina
-Salem
-Ahmad
I granted Roles to users on hr tables.
additional, created my own roles in data base and granted to my users:
ADMINISTRATOR  Lina - can see all records
EMPLOYEE Ahmad -can see the records added by this employee
CUSTOMER  Salem - can see the records belongs to this customer
In developer 10.1.3.3
I created Order Entity been using HR database connection, created session been,
Modified web.xml:
-security roles["ADMINISTRATOR","EMPLOYEE","CUSTOMER"])
-Loginconfig (Form-based authentication: login page, error page)
-Security constraints: ord on /faces/Orders.jsp to ADMINISTRATOR,EMPLOYEE,CUSTOMER.
I created Orders.jsp page contains order table.
Now, I want that when the user login as Lina to switch the EJB database connection to Lina, so the displayed order table achieves ADMINISTRATOR roles that created in database,means opening database session for user Lina and use it.
and so on for user salem and ahmad.
Is there a way to do that? To use dynamic EJB connections? To achieve authentication based connection? to implement the user database roles on the client side? To specify the database connection at run time?
That is possible using forms but I don’t want to use forms.
I want to reed the roles from database according to the user.
I hope to get answers soon,
thanks.

Does JNDI do this job?

Similar Messages

Maybe you are looking for

  • How feasible would it be to DIY BDB JE encyrption

    Hello All, I'm aware that BDB JE won't be supporting encryption. However, if I wanted to be bold/foolish enough to implement encryption myself for my project, what would the options be? I have encryption code (http://www.jasypt.org/). I have a small

  • IPod restarts after every Kings of Leon song

    both confusing & irritating.... only happens with the latest album (bought on iTunes, not ripped) anyone have an idea?

  • Can't scan on 5610 all-in-one

    I get a message that there are no scan options. How do I correct this? 

  • Problem while installing Usage Tracking in OBIEE 10g

    Hi all, I am installing usage tracking in OBIEE for that created a database called usertracking using the sample tables provided in OBIEE 10g. everything is fine, but while configuring the NQSConfig.INI (like, PHYSICAL_TABLE_NAME   = "usertracking"."

  • Getting iPhoto comments to iWeb (iLife 08)

    I have a tediously-commented set of photos I made in whatever version of iPhoto was current in 2003. I want to publish them with iWeb to a photo page, but none of the comments carry over, instead I get photo captions like "IMG_0124" when what I reall