Is it legal to do the following in order to use multiple databases in
the same application?

In the second session-factory element, I'm passing a new url/user/pass
but using the same dialect.  

 <hibernate-configuration>
    <property name="show_sql">false</property>
    <property name="use_outer_join">true</property>

    <!-- using the default database 
         from the hibernate.properties file -->
    <session-factory name="/jndi/hibernate/main">
        <property name="dialect">
          net.sf.hibernate.dialect.InterbaseDialect
      </property>
      <mapping resource="resources/hbm/base/Address.hbm.xml"/>
      <mapping resource="resources/hbm/base/Alias.hbm.xml"/>
    </session-factory>

    <!-- using the authentication database 
         define in this file  -->
    <session-factory name="/jndi/hibernate/auth">           
        <property name="dialect">
            net.sf.hibernate.dialect.InterbaseDialect
        </property>
        <property name="connection.username">authuser</property>
        <property name="connection.password">motcle</property>
        <property name="connection.driver_class">
           org.firebirdsql.jdbc.FBDriver
        </property>
        <property name="connection.url">
                jdbc:firebirdsql:localhost/3050:/database/auth.gdb
        </property>
        <mapping file="C:/mapping/my_mappings.hbm.xml"/>
        <mapping resource="resources/hbm/access/User.hbm.xml"/>
        <mapping resource="resources/hbm/access/Role.hbm.xml"/>
        <mapping resource="resources/hbm/access/Priviledge.hbm.xml"/>
        
    </session-factory

 <hibernate-configuration>

Thank you for your time.




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to