leosutic 2002/09/06 08:41:17
Modified: fortress/src/java/org/apache/excalibur/fortress/util
ContextManager.java
Log:
Added lazy init of m_processors so the ThreadManager can run in sandboxed
environments. Patch from Christopher Kohlhaas [[EMAIL PROTECTED]].
Revision Changes Path
1.38 +12 -4
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java
Index: ContextManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- ContextManager.java 13 Aug 2002 07:57:27 -0000 1.37
+++ ContextManager.java 6 Sep 2002 15:41:17 -0000 1.38
@@ -214,14 +214,13 @@
* <code>ContextManager</code> is responsible for destroying the
* manager when the <code>ContextManager</code> is destroyed.
*
- * FIXME: Should this really be public? Also, we should throw a
- * NullPointerException instead.
+ * FIXME: We should throw a NullPointerException instead.
*
* @param object The object being claimed
*
* @throws IllegalArgumentException if the object is null.
*/
- public void assumeOwnership( Object o )
+ private void assumeOwnership( Object o )
{
if( o == null )
{
@@ -477,6 +476,15 @@
Integer threadsPerProcessor;
Long threadBlockTimeout;
+ try
+ {
+ Integer processors = (Integer) rootContext.get( "processors" );
+ p.setParameter( "processors", processors.toString() );
+ }
+ catch( ContextException e )
+ {
+ }
+
try
{
threadsPerProcessor = (Integer) rootContext.get( THREADS_CPU );
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>