Re: opening multiple databases from same program

[email protected] Sat, 10 Jul 2010 08:50:11 +0000
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <899488191-1278751844-cardhu_decombobulator_blackberry.rim.net-542474129-@bda214.bisx.produk.on.blackberry>
Check Talend for an open source ETL
Envoyé par mon BlackBerry Wireless Handheld.

-----Original Message-----
From: [email protected]
Sender: [email protected]
Date: Sat, 10 Jul 2010 10:50:33 
To: <[email protected]>
Reply-To: [email protected]
Subject: Re: [SimpleORM] opening multiple databases from same program

SimpleOrm does indeed take care to protect you from threading issues, and therefor tests session/thread associations carefully.

However, there is a method

  detachFromThread()

which can be used to shuffle sessions -- see LongTransactionTest. 

However, I would generally prefer Abel's solution if the data involved is not huge.

If it is, then there is a place for raw JDBC.  Or maybe an ETL tool if you have a lot to do.

Anthony

At 01:11 AM 10/07/2010, you wrote:
>  
>
>Hi
>
>I'm opening multiple different databases from the same thread, which is triggering this check:
>
> simpleorm.utils.SException$Error: Thread's SSession already open [SS 1.SkyMon]
>[<mailto:0@17:08:40.976>0@17:08:40.976] !SE>:     at simpleorm.sessionjdbc.SSessionJdbc.innerOpen(SSessionJdbc.java:129)
>[<mailto:0@17:08:40.976>0@17:08:40.976] !SE>:     at simpleorm.sessionjdbc.SSessionJdbc.open(SSessionJdbc.java:88)
>[<mailto:0@17:08:40.976>0@17:08:40.976] !SE>:     at simpleorm.sessionjdbc.SSessionJdbc.open(SSessionJdbc.java:108)
>
>
>What do I do?
>
>Thanks, Noel Grandin
>
>
>
>
>
>----------
>Disclaimer: <http://www.peralex.com/disclaimer.html>http://www.peralex.com/disclaimer.html
>
>

Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.