Issue Details (XML | Word | Printable)

Key: DIRSERVER-322
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Trustin Lee
Reporter: Tony Blanchard
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Problem with the shutdown sequence.

Created: 08/Jul/05 07:10 PM   Updated: 21/Apr/07 11:13 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 12/Aug/05 04:42 PM


 Description  « Hide
In AbstractContextFactory:getInitialContext

1-gets the DefaultContextFactoryService and asks it to shutdown.
    1-1-DefaultContextFactoryService shuts down and reset startupConfiguration field
2- asks the DefaultContextFactoryService to getInitialContext and uses checkSecuritySettings before returning DeadContext
  2-1 checkSecuritySettings uses startupConfiguration field and throws NullPointerException...

To pass this problem I made a temporary change to the DefaultContextFactoryService by commenting the startupConfiguration = null; in the finally block of shutdown() method.

Instead, I putted this code in the getJNDIContext method :
"checkSecuritySettings[...]

if (!started)
{
   startupConfiguration = null; //New code
  return DeadContext();
}"

 I made this because using afterShutdown hook is to early in sequence and I think only an authentified guy should shutdown the server...

On more thing is that it seams there is no test about shutdowning server and then make a call to an operation on it to produce an exception.
Best regards,
Tony

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alex Karasulu added a comment - 12/Aug/05 12:12 AM
Trustin can you take a look into this if it has not been corrected already. I suspect this issue is over and done with and can just be closed. Perhaps Tony can comment on this.

Alex Karasulu made changes - 12/Aug/05 12:12 AM
Field Original Value New Value
Assignee Alex Karasulu [ akarasulu ] Trustin Lee [ trustin ]
Repository Revision Date User Message
ASF #232224 Fri Aug 12 07:41:20 UTC 2005 trustin DIREVE-180
Made ContextPartitionNexus to throw a ServiceUnavailableException when user tries to operate on the service which is not started yet.
Files Changed
MODIFY /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/ContextPartitionNexusProxy.java

Trustin Lee added a comment - 12/Aug/05 04:42 PM
Yes, Tony's patch is already applied to trunk. I added some check code, too.

Trustin Lee made changes - 12/Aug/05 04:42 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 0.9.2 [ 12310192 ]
Alex Karasulu made changes - 10/Feb/06 12:34 PM
Project Directory Server [ 10516 ] Directory ApacheDS [ 12310260 ]
Key DIREVE-180 DIRSERVER-322
Fix Version/s 0.9.2 [ 12310192 ]
Emmanuel Lecharny added a comment - 21/Apr/07 11:13 AM
Closing all issues created in 2005 and before which are marked resolved

Emmanuel Lecharny made changes - 21/Apr/07 11:13 AM
Status Resolved [ 5 ] Closed [ 6 ]