I ask there but I do not receive anything. 

I will ask again here if anyone knows:
        I´m using dsdelegator-service, it changes one datasource for other.
My problem is that it changes it for all applications and web sessions. What
I need is to change the datasource just for a single session. For example,
if user A logs in the application it should be delegated to datasourceA, if
user B logs it should be delegated to datasourceB, etc... And everyone
logged should work with his correspondent datasource...

Is this possible with dsdelegator?

Regards,
Hernán.

PS: Alexey, thanks for your patience! :)
        

-----Original Message-----
From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
Sent: Viernes, 07 de Noviembre de 2003 02:59 tarde
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-dev] cmp with multiple datasource


why don't you ask it on jboss-user?

[EMAIL PROTECTED] wrote:

> I could do it with MBean  but, this code changes the server attribute (I
> mean, for all instances).
> Anyone know how to do it just for the current session?
> 
> // obtain the mbean server instance
> MBeanServer server = 
> (MBeanServer)MBeanServerFactory.findMBeanServer(null).iterator().next();
> // construct target object name
> ObjectName name = new ObjectName("jboss.varia:name=DataSourceDelegator");
> // set attribute value
> Attribute attr = new Attribute("TargetName", "java:/AnotherDS");
> server.setAttribute(name, attr);
> 
> -----Original Message-----
> From: Hernan Terzian 
> Sent: Jueves, 06 de Noviembre de 2003 12:30 tarde
> To: '[EMAIL PROTECTED]'
> Subject: RE: [JBoss-dev] cmp with multiple datasource
> 
> 
> I could do it work via jmx-console, but I cannot find the way to do it in
my
> program.
> I'm doing:
> 
>               DataSourceDelegator dsd = new DataSourceDelegator();
>               try{
>                       dsd.create();
>                       dsd.setBindName("java:/DS1");
>                       dsd.setTargetName("java:/DS2");
>               } catch (Exception e) {
>                       System.out.println("...");
>               }
> 
> what is wrong in here?
> 
> 
> -----Original Message-----
> From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
> Sent: Martes, 04 de Noviembre de 2003 03:31 tarde
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-dev] cmp with multiple datasource
> 
> 
> It is checked in Branch_3_2.
> org.jboss.varia.dsdelegator package.
> 
> After building (varia/build.bat), you should find dsdelegator.jar in 
> varia/output/lib. It should be copiied to server/<config-name>/lib.
> In varia/src/resources/services/dsdelegator you can find a sample config 
> dsdelegator-service.xml
> 
> Sorry, for the delay.
> 
> [EMAIL PROTECTED] wrote:
> 
> 
>>Yes please, I´ll be very thankful if you commit it!!!
>>
>>
>>-----Original Message-----
>>From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
>>Sent: Lunes, 03 de Noviembre de 2003 06:46 mañana
>>To: [EMAIL PROTECTED]
>>Subject: Re: [JBoss-dev] cmp with multiple datasource
>>
>>
>>I went another way and wrote a datasource delegator service. It is very 
>>simple. The service implements DataSource interface and has a method 
>>that sets the target DataSource. The service is bound into the JNDI. All 
>>you need to do is just to specify this service instead of a real 
>>DataSource for your entity beans and change the target at runtime.
>>
>>I could commit it in org.jboss.varia.* if there is an interest in it.
>>
>>[EMAIL PROTECTED] wrote:
>>
>>
>>>Alexey, first of all, thanks for your response.
>>>When do you think you will add this support?
>>>
>>>Regards,
>>>Hernán.
>>>
>>>-----Original Message-----
>>>From: Hernan Terzian 
>>>Sent: Viernes, 31 de Octubre de 2003 09:39 mañana
>>>To: '[EMAIL PROTECTED]'
>>>Subject: RE: [JBoss-dev] cmp with multiple datasource
>>>
>>>
>>>Yes!!! It would be great !!!
>>>
>>>-----Original Message-----
>>>From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
>>>Sent: Viernes, 31 de Octubre de 2003 07:47 mañana
>>>To: [EMAIL PROTECTED]
>>>Subject: Re: [JBoss-dev] cmp with multiple datasource
>>>
>>>
>>>We could add support for chaging entity bean's datasource at runtime 
>>>only in case when the datasources have the same type mappings 
>>>(datasource-mapping) and database schemas are the same. Would it help
you?
>>>
>>>[EMAIL PROTECTED] wrote:
>>>
>>>
>>>
>>>
>>>>this is my scenario:
>>>>    we need to migrate an old application that have 5 different
>>>>implementations, so when a user log into the application, it is
> 
> redirected
> 
>>>>to his respective server. In each server is running the same data model
>>>
>>>but
>>>
>>>
>>>
>>>>with different data.
>>>>
>>>>Now, we are migrating this old app (client/server) to web but we cannot
>>>>change the data model (damn customer issue), so I´m trying to not
>>>
>>>construct
>>>
>>>
>>>
>>>>different EJBs to each datasource.
>>>>
>>>>The meanwhile workaround is to create a new jar for each implementation
>>>
>>>(the
>>>
>>>
>>>
>>>>same code, but with different jndi names and datasources), but it
>>>
>>>represents
>>>
>>>
>>>
>>>>a heavy maintenance code...
>>>>
>>>>Any ideas?
>>>>
>>>>-----Original Message-----
>>>>From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
>>>>Sent: Jueves, 30 de Octubre de 2003 05:20 tarde
>>>>To: [EMAIL PROTECTED]
>>>>Subject: Re: [JBoss-dev] cmp with multiple datasource
>>>>
>>>>
>>>>No way, at the moment. But could you tell why you would like to do it?
>>>>Thanks.
>>>>
>>>>[EMAIL PROTECTED] wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Hi all,
>>>>>   does anybody know how can I change the CMP entity bean datasource on
>>>>>runtime? 
>>>>>   Are there any workaround to get this?
>>>>>
>>>>>Regards,
>>>>>Hernán.
>>>>>
>>>>>
>>>>>-------------------------------------------------------
>>>>>This SF.net email is sponsored by: SF.net Giveback Program.
>>>>>Does SourceForge.net help you be more productive?  Does it
>>>>>help you create better code?   SHARE THE LOVE, and help us help
>>>>>YOU!  Click Here: http://sourceforge.net/donate/
>>>>>_______________________________________________
>>>>>JBoss-Development mailing list
>>>>>[EMAIL PROTECTED]
>>>>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>This SF.net email is sponsored by: SF.net Giveback Program.
>>>>Does SourceForge.net help you be more productive?  Does it
>>>>help you create better code?   SHARE THE LOVE, and help us help
>>>>YOU!  Click Here: http://sourceforge.net/donate/
>>>>_______________________________________________
>>>>JBoss-Development mailing list
>>>>[EMAIL PROTECTED]
>>>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>This SF.net email is sponsored by: SF.net Giveback Program.
>>>>Does SourceForge.net help you be more productive?  Does it
>>>>help you create better code?   SHARE THE LOVE, and help us help
>>>>YOU!  Click Here: http://sourceforge.net/donate/
>>>>_______________________________________________
>>>>JBoss-Development mailing list
>>>>[EMAIL PROTECTED]
>>>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>>
>>>
>>>
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>This SF.net email is sponsored by: SF.net Giveback Program.
>>>Does SourceForge.net help you be more productive?  Does it
>>>help you create better code?   SHARE THE LOVE, and help us help
>>>YOU!  Click Here: http://sourceforge.net/donate/
>>>_______________________________________________
>>>JBoss-Development mailing list
>>>[EMAIL PROTECTED]
>>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>
>>>
>>>-------------------------------------------------------
>>>This SF.net email is sponsored by: SF.net Giveback Program.
>>>Does SourceForge.net help you be more productive?  Does it
>>>help you create better code?   SHARE THE LOVE, and help us help
>>>YOU!  Click Here: http://sourceforge.net/donate/
>>>_______________________________________________
>>>JBoss-Development mailing list
>>>[EMAIL PROTECTED]
>>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>
>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: SF.net Giveback Program.
>>Does SourceForge.net help you be more productive?  Does it
>>help you create better code?   SHARE THE LOVE, and help us help
>>YOU!  Click Here: http://sourceforge.net/donate/
>>_______________________________________________
>>JBoss-Development mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: SF.net Giveback Program.
>>Does SourceForge.net help you be more productive?  Does it
>>help you create better code?   SHARE THE LOVE, and help us help
>>YOU!  Click Here: http://sourceforge.net/donate/
>>_______________________________________________
>>JBoss-Development mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?   SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> JBoss-Development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?   SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> JBoss-Development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to