Announcement Announcement Module
Collapse
No announcement yet.
Spring+Hibernate - with seperate DB schemas Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring+Hibernate - with seperate DB schemas

    Hi,
    I want to use separate schemas to connect to a single Spring+Hibernate application.
    I am using entity manager and need some guide lines to connect through multiple schemas for a single application.
    We are using Oracle DB where we will have different schema.

    Thanks in advance.

  • #2
    Hello

    I want to use separate schemas to connect to a single Spring+Hibernate application.
    Yes you can

    Do a research about Spring working with JTA, it is due to keep a single transaction control over many databases (even for JMS). It is related with XA

    Let me know your advance

    Comment


    • #3
      Thanks for your prompt reply sir!

      In @Table annotation there is one property "schema", where we can mention in which schema the current table is located.

      Also, we need to grant reference privileges to the schema to which our application is connected to.

      For e.g. There are two schema's , schema 1 and 2.
      And our application is connected to schema 2.
      Then we need to grant reference privileges of schema 1 to schema 2.
      No need to use schema reference in queries or any other place other than annotation.

      Hope this also helps others.

      Comment

      Working...
      X