Re: Configure and communicate with multiple databases

2018-03-07 Thread a . chowdhury006
Thanks Lukas for your quick response and it made my day.
After making two separate plugin executions for the code generator, it ran 
successfully.

I actually happened to see your post in the following link and it worked 
perfectly for me.
https://stackoverflow.com/questions/26103628/jooq-codegen-maven-plugin-for-different-db-at-the-same-time
 


On Tuesday, 6 March 2018 13:30:02 UTC+5:30, Anirban Chowdhury wrote:
>
> Hello,
>
> I want to configure my project with two different database server using 
> JOOQ. Both the DB servers are of postgresql. I am quite aware of how to 
> configure with single database server and then communicating with 
> single/multiple schemas. But I did not get enough information to configure 
> and then communicate with two different DB server.
>
> For e.g. I have two differnet DB server one at my local machine and 
> another one on remote machine (10.210.230.1).
> Now I need to communicate with two databases like sec_master_test (in 
> localhost) and sec_pii (in remote machine).
> Relevant schemas are testods (in localhost) and testpii (in remote 
> machine).
>
>  As of now my pom.xml looks like the following.
>
> 
> 
> 
>   org.postgresql.Driver
>   jdbc:postgresql://localhost:4321/sec_master_test
>   testadm
>   
> 
> 
> 
>   
> org.jooq.util.postgres.PostgresDatabase
> .*
> 
> 
> 
>   testods
> 
> 
>   testpii
> 
> 
> false
>   
>   
>   com.myproj.test.generated
> src/main/java
>   
> 
> 
>
> This above configuration works fine when both the schemas (testods, 
> testpii) are in the same database.
> Can you please suggest what configuration change is required if both the 
> schemas are in two different database servers.
>
> Just FYI, I do not want to join b/w tables of two different DB servers. My 
> use case is I want to fetch some information from a table in local database 
> and based on the result want to query another table in remote database 
> server. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Configure and communicate with multiple databases

2018-03-06 Thread Lukas Eder
Hello,

Thanks for your message. You need two entirely independent configurations
for the code generator and the runtime. They're not related. Think about it
this way: You're really creating two separate applications that just happen
to work together at some point, each application has its own jOOQ
configuration / environment.

With Maven, you could run two separate plugin executions for the code
generator.

I hope this helps,
Lukas

2018-03-06 7:27 GMT+01:00 :

> Hello,
>
> I want to configure my project with two different database server using
> JOOQ. Both the DB servers are of postgresql. I am quite aware of how to
> configure with single database server and then communicating with
> single/multiple schemas. But I did not get enough information to configure
> and then communicate with two different DB server.
>
> For e.g. I have two differnet DB server one at my local machine and
> another one on remote machine (10.210.230.1).
> Now I need to communicate with two databases like sec_master_test (in
> localhost) and sec_pii (in remote machine).
> Relevant schemas are testods (in localhost) and testpii (in remote
> machine).
>
>  As of now my pom.xml looks like the following.
>
> 
> 
> 
>   org.postgresql.Driver
>   jdbc:postgresql://localhost:4321/sec_master_test
>   testadm
>   
> 
> 
> 
>   
> org.jooq.util.postgres.PostgresDatabase
> .*
> 
> 
> 
>   testods
> 
> 
>   testpii
> 
> 
> false
>   
>   
>   com.myproj.test.generated
> src/main/java
>   
> 
> 
>
> This above configuration works fine when both the schemas (testods,
> testpii) are in the same database.
> Can you please suggest what configuration change is required if both the
> schemas are in two different database servers.
>
> Just FYI, I do not want to join b/w tables of two different DB servers. My
> use case is I want to fetch some information from a table in local database
> and based on the result want to query another table in remote database
> server.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jooq-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.