I have the same problem... I don't know how to solve this. 

Did you solve the error?


Em segunda-feira, 25 de abril de 2016 10:44:14 UTC-3, vandana gopal 
escreveu:
>
> I am trying to use two different databases within the same resource 
> method. But it looks like the UnitOfWork automatically scopes the resource 
> method to a session of a single database. 
> Here is my code:
> @GET
> @UnitOfWork(value="db1Hibernate")
> public Response getItemDocuments() {
>    
>   Organization org = getOrg();
>   Item item = <use db1 dao here>
> }
>
> @UnitOfWork(value="db2Hibernate")
> private Organization getOrg(){
>   Organization org = <use db2 dao here>
>    return org;
> }
>
> However this does not work. The getOrg method throws an error "No session 
> currently bound to execution context".
> If I change the @UnitOfWork value to db2Hibernate on the getItemDocuments 
> method, then the getOrg method works fine, but then the Item statement 
> throws the error.
> Manually opening a session and registering it with ManagedSessionContext 
> works fine, but wanted to know if there is a way to handle two databases 
> seamlessly.
> Any help is greatly appreciated.
> Any help is greatly appreciated.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to