[ http://issues.apache.org/jira/browse/TRB-5?page=comments#action_12330107 
] 

Thomas Vandahl commented on TRB-5:
----------------------------------

I tried to debug the login request (which fails in my case) and got the 
following:

- The mapping of the default database is ok. TorqueInstance.getDefaultDB() 
returns "turbine"
- In the BaseTurbineUserPeer-class, there is the following method:

    private static void setDbName(Criteria crit)
    {
        // Set the correct dbName if it has not been overridden
        // crit.getDbName will return the same object if not set to
        // another value so == check is okay and faster
        if (crit.getDbName() == Torque.getDefaultDB())
        {
            crit.setDbName(DATABASE_NAME);
        }
    }

- As the Criteria contains the correct default database name ("turbine") the 
comparison is true and the databse name of the class ("default") is set in the 
criteria. This key, however, doesn't exist in the dsFactoryMap of 
TorqueInstance and we get no connection. Boom.

> TorqueSecurityService relies on a datasource named "default"
> ------------------------------------------------------------
>
>          Key: TRB-5
>          URL: http://issues.apache.org/jira/browse/TRB-5
>      Project: Turbine
>         Type: Bug
>   Components: Turbine 2.3
>  Environment: Turbine-2.3.2-rc2.-dev
>     Reporter: Thomas Vandahl
>     Assignee: Henning Schmiedehausen

>
> The OM-classes generated during the build process of Turbine need a 
> hard-coded data source called "default".
> The previous version simply used the configured default DataSource as in
> torque.database.default=turbine

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to