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 <a.chowdhury...@gmail.com>:

> 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.
>
> <configuration>
>             <!-- JDBC connection parameters -->
>     <jdbc>
>       <driver>org.postgresql.Driver</driver>
>       <url>jdbc:postgresql://localhost:4321/sec_master_test</url>
>       <user>testadm</user>
>       <password></password>
>     </jdbc>
>     <!-- Generator parameters -->
>     <generator>
>       <database>
>         <name>org.jooq.util.postgres.PostgresDatabase</name>
>         <includes>.*</includes>
>         <excludes></excludes>
>         <schemata>
>         <schema>
>           <inputSchema>testods</inputSchema>
>         </schema>
>         <schema>
>           <inputSchema>testpii</inputSchema>
>         </schema>
>     </schemata>
>         <tableValuedFunctions>false</tableValuedFunctions>
>       </database>
>       <target>
>       <packageName>com.myproj.test.generated</packageName>
>         <directory>src/main/java</directory>
>       </target>
>     </generator>
> </configuration>
>
> 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.

Reply via email to