Results 1 to 3 of 3

Thread: Spring+Hibernate - with seperate DB schemas

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Posts
    11

    Default 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. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    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
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Jul 2011
    Posts
    11

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •