db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Vandahl (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TORQUE-68) DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
Date Sat, 23 Dec 2006 16:58:22 GMT
    [ http://issues.apache.org/jira/browse/TORQUE-68?page=comments#action_12460652 ] 
            
Thomas Vandahl commented on TORQUE-68:
--------------------------------------

I actually am in favour for 2),  but let's talk about this in the 4.0 development. For 3.3,
the problem might not be as bad as it sounds. My further investigations show that the problem
buried here has been addressed by some measures but is not completely resolved. So what happens
is this:

When Torque is shutdown and restarted, a new instance is created. There is some code which
tries to deal with unserialized om objects, but in our case, the static constructor of the
peer class is not executed. So the Mapbuilder of the class is not registered with Torque and
cannot be put into the BasePeer mapBuilders Hashtable. However, the mapBuilders Hashtable
inside BasePeer is static itself and contains old and invalid entries from the previous run.
It might be sufficient to clear this Hashtable during shutdown(). I'll check that out.


> DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs
> -------------------------------------------------------------------------
>
>                 Key: TORQUE-68
>                 URL: http://issues.apache.org/jira/browse/TORQUE-68
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Generator
>    Affects Versions: 3.3
>         Environment: Avalon, JUnit-Tests
>            Reporter: Thomas Vandahl
>
> When running tests with the Fulcrum-Testcontainer, the TorqueComponent is instantiated
on every lookup (setUp()) and shutdown on every tearDown(). In this scenario the first test
succeeds and all others fail because the DatabaseMap contains no tables. This is probably
caused by invalid static references to the DatabaseMap of the previous instance. This situation
causes NullPointerExceptions in several BasePeer methods(e.g. processTables()).

-- 
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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message