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 2007/10/02 07:02:06 UTC
svn commit: r581138 - in /directory:
apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/
apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/
apacheds/branches/bigbang/server-jndi/src/m...
Author: akarasulu
Date: Mon Oct 1 22:02:05 2007
New Revision: 581138
URL: http://svn.apache.org/viewvc?rev=581138&view=rev
Log:
moving some configuration properties to the right place before removing configuration beans
Modified:
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java
directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
directory/installers/branches/bigbang/apacheds-noarch/ (props changed)
directory/installers/branches/bigbang/apacheds/src/main/installers/ (props changed)
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=581138&r1=581137&r2=581138&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Mon Oct 1 22:02:05 2007
@@ -86,8 +86,6 @@
private static final Logger log = LoggerFactory.getLogger( DefaultDirectoryService.class );
private static final String BINARY_KEY = JndiPropertyConstants.JNDI_LDAP_ATTRIBUTES_BINARY;
- private final String instanceId;
-
private final DirectoryServiceConfiguration configuration = new DefaultDirectoryServiceConfiguration( this );
private DirectoryServiceListener serviceListener;
@@ -120,6 +118,7 @@
// Constructor
// ------------------------------------------------------------------------
+
/**
* Creates a new instance.
*/
@@ -134,8 +133,36 @@
// ------------------------------------------------------------------------
+ // C O N F I G U R A T I O N M E T H O D S
+ // ------------------------------------------------------------------------
+
+
+// public static final int MAX_THREADS_DEFAULT = 32;
+// public static final int MAX_SIZE_LIMIT_DEFAULT = 100;
+// public static final int MAX_TIME_LIMIT_DEFAULT = 10000;
+//
+ private String instanceId;
+// private File workingDirectory = new File( "server-work" );
+// private boolean exitVmOnShutdown = true; // allow by default
+// private boolean shutdownHookEnabled = true; // allow by default
+// private boolean allowAnonymousAccess = true; // allow by default
+// private boolean accessControlEnabled; // off by default
+// private boolean denormalizeOpAttrsEnabled; // off by default
+// private int maxThreads = MAX_THREADS_DEFAULT; // set to default value
+// private int maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; // set to default value
+// private int maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; // set to default value (milliseconds)
+// private List<Interceptor> interceptors;
+// private Partition systemPartition;
+// private Set<? extends Partition> partitions = new HashSet<Partition>();
+// private List<? extends Entry> testEntries = new ArrayList<Entry>(); // List<Attributes>
+
+
+
+
+ // ------------------------------------------------------------------------
// BackendSubsystem Interface Method Implemetations
// ------------------------------------------------------------------------
+
public Context getJndiContext( String rootDN ) throws NamingException
{
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java?rev=581138&r1=581137&r2=581138&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java Mon Oct 1 22:02:05 2007
@@ -65,12 +65,6 @@
}
- public void setMaxThreads( int maxThreads )
- {
- super.setMaxThreads( maxThreads );
- }
-
-
public void setInstanceId( String instanceId )
{
super.setInstanceId( instanceId );
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?rev=581138&r1=581137&r2=581138&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Mon Oct 1 22:02:05 2007
@@ -62,13 +62,11 @@
*/
public class StartupConfiguration extends Configuration
{
-
/** The logger for this class */
private static final Logger log = LoggerFactory.getLogger( StartupConfiguration.class );
private static final long serialVersionUID = 4826762196566871677L;
- public static final int MAX_THREADS_DEFAULT = 32;
public static final int MAX_SIZE_LIMIT_DEFAULT = 100;
public static final int MAX_TIME_LIMIT_DEFAULT = 10000;
@@ -76,9 +74,8 @@
private boolean exitVmOnShutdown = true; // allow by default
private boolean shutdownHookEnabled = true; // allow by default
private boolean allowAnonymousAccess = true; // allow by default
- private boolean accessControlEnabled = false; // turn off by default
- private boolean denormalizeOpAttrsEnabled = false;
- private int maxThreads = MAX_THREADS_DEFAULT; // set to default value
+ private boolean accessControlEnabled; // off by default
+ private boolean denormalizeOpAttrsEnabled; // off by default
private int maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; // set to default value
private int maxTimeLimit = MAX_TIME_LIMIT_DEFAULT; // set to default value (milliseconds)
private List<Interceptor> interceptors;
@@ -314,22 +311,6 @@
public boolean isExitVmOnShutdown()
{
return exitVmOnShutdown;
- }
-
-
- protected void setMaxThreads( int maxThreads )
- {
- this.maxThreads = maxThreads;
- if ( maxThreads < 1 )
- {
- throw new IllegalArgumentException( "Number of max threads should be greater than 0" );
- }
- }
-
-
- public int getMaxThreads()
- {
- return maxThreads;
}
Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java?rev=581138&r1=581137&r2=581138&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java Mon Oct 1 22:02:05 2007
@@ -46,9 +46,10 @@
private static final long serialVersionUID = -7138616822614155454L;
private static final long DEFAULT_SYNC_PERIOD_MILLIS = 20000;
+ public static final int MAX_THREADS_DEFAULT = 32;
+ private int maxThreads = MAX_THREADS_DEFAULT; // set to default value
private long synchPeriodMillis = DEFAULT_SYNC_PERIOD_MILLIS;
-
private boolean enableNetworking = true;
private File ldifDirectory = null;
@@ -70,6 +71,22 @@
protected ServerStartupConfiguration( String instanceId )
{
super( instanceId );
+ }
+
+
+ public int getMaxThreads()
+ {
+ return maxThreads;
+ }
+
+
+ protected void setMaxThreads( int maxThreads )
+ {
+ this.maxThreads = maxThreads;
+ if ( maxThreads < 1 )
+ {
+ throw new IllegalArgumentException( "Number of max threads should be greater than 0" );
+ }
}
Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?rev=581138&r1=581137&r2=581138&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Mon Oct 1 22:02:05 2007
@@ -136,7 +136,7 @@
DirectoryServiceContext dsc = new DirectoryServiceContext();
contexts.put(service, dsc);
- int maxThreads = service.getConfiguration().getStartupConfiguration().getMaxThreads();
+ int maxThreads = ( ( ServerStartupConfiguration ) service.getConfiguration().getStartupConfiguration() ).getMaxThreads();
dsc.ioExecutor = Executors.newCachedThreadPool();
dsc.logicExecutor = Executors.newFixedThreadPool( maxThreads );
dsc.udpAcceptor = new DatagramAcceptor();
Propchange: directory/installers/branches/bigbang/apacheds-noarch/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct 1 22:02:05 2007
@@ -1,4 +1,5 @@
server.xml
+work
META-INF
server-work
example.com
Propchange: directory/installers/branches/bigbang/apacheds/src/main/installers/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct 1 22:02:05 2007
@@ -1,2 +1,3 @@
META-INF
+work
server.xml