[jboss-jira] [JBoss JIRA] Closed: (JBPM-965) configuring DbPersistenceServiceFactory is not working

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Fri Jun 1 08:38:18 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBPM-965?page=all ]

Tom Baeyens closed JBPM-965.
----------------------------

    Resolution: Cannot Reproduce Bug

this is not a bug :-)

you mixed the short notation with the long notation (i know it is not elegant enough as several developers (incl me) have stumbled over this).  but i'm not going to fix it now.

i checked short and long notation for configuration like this and i double checked the docs

  public void testDbPersistenceConfigurationDefault() {
    JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
      "<jbpm-configuration>" +
      "  <jbpm-context>" +
      "    <service name='persistence' factory='"+DbPersistenceServiceFactory.class.getName()+"' />" +
      "  </jbpm-context>" +
      "</jbpm-configuration>"
    );
    DbPersistenceServiceFactory dbPersistenceServiceFactory = (DbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory("persistence");
    assertNull(dbPersistenceServiceFactory.dataSourceJndiName);
    assertFalse(dbPersistenceServiceFactory.isCurrentSessionEnabled);
    assertTrue(dbPersistenceServiceFactory.isTransactionEnabled);
  }

  public void testDbPersistenceConfigurationProvidedValues() {
    JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
      "<jbpm-configuration>" +
      "  <jbpm-context>" +
      "    <service name='persistence'>" +
      "      <factory>" +
      "        <bean class='"+DbPersistenceServiceFactory.class.getName()+"'>" +
      "          <field name='dataSourceJndiName'><string value='java:/myDataSource'/></field> " +
      "          <field name='isCurrentSessionEnabled'><true /></field> " +
      "          <field name='isTransactionEnabled'><false /></field> " +
      "        </bean>" +
      "      </factory>" +
      "    </service>" +
      "  </jbpm-context>" +
      "</jbpm-configuration>"
    );
    DbPersistenceServiceFactory dbPersistenceServiceFactory = (DbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory("persistence");
    assertEquals("java:/myDataSource", dbPersistenceServiceFactory.dataSourceJndiName);
    assertTrue(dbPersistenceServiceFactory.isCurrentSessionEnabled);
    assertFalse(dbPersistenceServiceFactory.isTransactionEnabled);
  }


> configuring DbPersistenceServiceFactory is not working
> ------------------------------------------------------
>
>                 Key: JBPM-965
>                 URL: http://jira.jboss.com/jira/browse/JBPM-965
>             Project: JBoss jBPM
>          Issue Type: Bug
>          Components: Core Engine
>            Reporter: Bernd Ruecker
>         Assigned To: Tom Baeyens
>            Priority: Minor
>
> Configuring the DbPersistenceServiceFactory  is not working like it is described in the documentation, see Forum reference for more details.

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

        



More information about the jboss-jira mailing list