jUDDI
  1. jUDDI
  2. JUDDI-517

Externalising Persistence Properties

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.1.2
    • Component/s: core
    • Labels:
    • Environment:
      Websphere App Server 7 and DB2 DB

      Description

      Properties of Persistence xml needs to be externalized.

      Changes with need to be done
      1) org.apache.juddi.config.Property.java
      public final static String PERSISTENCE_PROVIDER ="persistenceProvider";
      public final static String DATASOURCE ="hibernate.connection.datasource";
      public final static String HBM_DDL_AUTO ="hibernate.hbm2ddl.auto";
      public final static String DEFAULT_SCHEMA ="hibernate.default_schema";
      public final static String HIBERNATE_DIALECT ="hibernate.dialect";

      2) org.apache.juddi.config.AppConfig.java

      private void loadConfiguration() throws ConfigurationException
      {
      ....
      if(propConfig.getString(Property.PERSISTENCE_PROVIDER).equalsIgnoreCase("Hibernate"))

      { properties = new HashMap<String, String>(); properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE)); properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO)); properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA)); properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT)); }

      ....
      }

      3) org.apache.juddi.config. PersistenceManager.java

      protected static void initializeEntityManagerFactory(String persistenceUnitName,Map<String, String> properties) {
      try {
      if (emf == null ){
      if(properties != null)

      { emf = Persistence.createEntityManagerFactory(persistenceUnitName,properties); }

      else

      { emf = Persistence.createEntityManagerFactory(persistenceUnitName); }

      }

      }
      }

        Activity

        Ashley created issue -
        Kurt T Stam made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Not A Problem [ 8 ]
        Ashley made changes -
        Resolution Not A Problem [ 8 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Kurt T Stam made changes -
        Fix Version/s 3.1.2 [ 12317144 ]
        Kurt T Stam made changes -
        Fix Version/s 3.1.1 [ 12315125 ]
        Fix Version/s 3.1.2 [ 12317144 ]
        Kurt T Stam made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Kurt T Stam made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Kurt T Stam made changes -
        Fix Version/s 3.1.2 [ 12317144 ]
        Kurt T Stam made changes -
        Fix Version/s 3.1.1 [ 12315125 ]
        Kurt T Stam made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Kurt T Stam
            Reporter:
            Ashley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development