Hi Christian,

Are you going to use Bean Managed Persistence or Container Managed
Persistence. If you are going to use Bean Managed Persistence you can
load a datasource to DB_CompanyA when company A user logs in and when
a user of company b logs in you can load a datasource to DB_CompanyB.

When you are going to use Container Managed Persistence I don't know if
you can do this other that create different beans for the different
company's.

Hope this will help.

Greetings Wim Veninga.





Christian Kvalheim wrote:

> Hey..
>
> I'm in the middle of developing the next version of
> our software platform for quality management and I
> have run into the following problem. The current
> development platform is ASP/COM but we are moving to
> J2EE and orionserver as our platform of choice.
>
> This is the problem
>
> When a user connects to the application, he chooses
> the company that he belongs to. This sets the context
> of the program to point to the database of that
> company and all operations are performed on that
> database.
>
> This if Company A has the database 'COMPANYA' and
> Company B has the database 'COMPANYB' users belonging
> to company A will be using the data in COMPANYA when
> performing EJB transactions, While Users in Company B
> will use COMPANYB when performing EJB transactions.
>
> Now the problem lies in my tellin the EJB to use
> database COMPANYB when a user from company B logs on
> and COMPANYA whem a user from company A logs on. Of
> course we are talking about hundreds and hopefully
> thousands of databases over time, so the context must
> be possible to switch easily.
>
> Can I do this someway with EJB, without resulting to
> the situation of modifying SQL sentences.
>
> Christian Kvalheim
> Qm plus
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf!  It's FREE.
> http://im.yahoo.com/


Reply via email to