[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1046) Reverse Engineering: Eclipse Plug-in: suppress connection information from generated hibernate.cfg.xml

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Tue Mar 4 22:13:33 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29681 ] 

Max Rydahl Andersen commented on HBX-1046:
------------------------------------------

why are you generating a cfg.xml from a jdbcconfiguration ?

why not generate it from a plain <configuration> with the proper mappings adds via filesets and properties set via a properties file or individual property settings ?

> Reverse Engineering: Eclipse Plug-in: suppress connection information from generated hibernate.cfg.xml
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HBX-1046
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1046
>             Project: Hibernate Tools
>          Issue Type: Improvement
>          Components: reverse-engineer
>    Affects Versions: 3.2.cr1
>         Environment: Hibernate 3.2.5ga
> Oracle 10j
> Eclipse 3.3.1.1
>            Reporter: Martin Hache
>
> We're using the latest Hibernate Tools Plugin for Eclipse (3.2.0GA.) and we're reverse engineering our hibernate.cfg.xml file, unfortunately, the generated file (used at runtime by the application) contains the following settings that we need to suppress:
> <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
> <property name="hibernate.connection.password">shhhhhh</property>
> <property name="hibernate.connection.url">jdbc:oracle:thin:@server.domain.com:1542:SID</property>
> <property name="hibernate.connection.username">my_schema</property>
> <property name="hibernate.default_schema">my_schema</property>
> We reverse-engineer out of our DEV environment so we need to put these in the hibernate.cfg.xml file used during the reverse-engineering process but we don't want them in the generated (runtime)  file because we use a Data Source in our J2EE container which points to different databases and because these connection information represents a security risk.
> The connection information is undesirable but at least the Data Source takes precedence at runtime; however, the hibernate.default_schema is a problem because that too changes in different environments within the enterprise.   We're presently using a process in Ant to remove the value from the generated hibernate.cfg.xm but this it is a ticking time-bomb waiting to go off during some future maintenance phase of the application.
> Would it be possible to add some sort of argument to allow us to decide if these values should be propagated to the generated file or not?  Or to allow the connection and schema info to be externalized?
> My team has been unable to find documentation on how to do this and I have received no responses to posts in the forum so we're working under the assumption that it's not possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list