You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/05/31 07:38:57 UTC
svn commit: r661953 -
/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
Author: akarasulu
Date: Fri May 30 22:38:56 2008
New Revision: 661953
URL: http://svn.apache.org/viewvc?rev=661953&view=rev
Log:
revert last change better to have separate start check from push which may be deleted
Modified:
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=661953&r1=661952&r2=661953&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java Fri May 30 22:38:56 2008
@@ -225,6 +225,7 @@
*/
public void add( AddOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -243,6 +244,7 @@
*/
public void bind( BindOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -261,6 +263,7 @@
*/
public boolean compare( CompareOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -279,6 +282,7 @@
*/
public void delete( DeleteOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -297,6 +301,7 @@
*/
public LdapDN getMatchedName( GetMatchedNameOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -316,6 +321,7 @@
public ClonedServerEntry getRootDSE( GetRootDSEOperationContext opContext, Collection<String> bypass )
throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -334,6 +340,7 @@
*/
public LdapDN getSuffix( GetSuffixOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -352,6 +359,7 @@
*/
public boolean hasEntry( EntryOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -370,6 +378,7 @@
*/
public EntryFilteringCursor list( ListOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -389,6 +398,7 @@
public Iterator<String> listSuffixes( ListSuffixOperationContext opContext, Collection<String> bypass )
throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -407,6 +417,7 @@
*/
public ClonedServerEntry lookup( LookupOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -425,6 +436,7 @@
*/
public void modify( ModifyOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -443,6 +455,7 @@
*/
public void move( MoveOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -461,6 +474,7 @@
*/
public void moveAndRename( MoveAndRenameOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -479,6 +493,7 @@
*/
public void rename( RenameOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -497,6 +512,7 @@
*/
public EntryFilteringCursor search( SearchOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -515,6 +531,7 @@
*/
public void unbind( UnbindOperationContext opContext, Collection<String> bypass ) throws Exception
{
+ ensureStarted();
push( opContext, bypass );
try
@@ -528,13 +545,17 @@
}
- private void push( OperationContext opContext, Collection<String> bypass ) throws ServiceUnavailableException
+ private void ensureStarted() throws ServiceUnavailableException
{
if ( ! directoryService.isStarted() )
{
throw new ServiceUnavailableException( "Directory service is not started." );
}
+ }
+
+ private void push( OperationContext opContext, Collection<String> bypass ) throws ServiceUnavailableException
+ {
// TODO - need to remove Context caller and PartitionNexusProxy from Invocations
Invocation invocation = new Invocation( null, null, opContext.getName(), bypass );
InvocationStack stack = InvocationStack.getInstance();