Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
View | Details | Raw Unified | Return to bug 801
Collapse All | Expand All

(-)AOM.java.orig (-14 / +74 lines)
Lines 36-41 Link Here
36
36
37
import org.apache.avalon.framework.logger.Logger;
37
import org.apache.avalon.framework.logger.Logger;
38
38
39
import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
40
import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
41
42
39
/**
43
/**
40
 * This class maps object id's to servants and vice versa.
44
 * This class maps object id's to servants and vice versa.
41
 * A oid/servant pair can be added/removed using add(),remove().
45
 * A oid/servant pair can be added/removed using add(),remove().
Lines 72-77 Link Here
72
    private final byte[]              deactivationListLock = new byte[0];
76
    private final byte[]              deactivationListLock = new byte[0];
73
77
74
78
79
        private BlockingQueue removalQueue = new LinkedBlockingQueue(); 
80
    
81
    class RemovalStruct
82
    {
83
    byte[] oid_;
84
    RequestController requestController_ ;
85
    ServantActivator servantActivator_;
86
    POA poa_;
87
    boolean cleanupInProgress_;
88
    
89
	public RemovalStruct(byte[] oid_, RequestController requestController_,
90
							ServantActivator servantActivator_, POA poa_, boolean cleanupInProgress_)
91
	{
92
		super();
93
		this.oid_ = oid_;
94
		this.requestController_ = requestController_;
95
		this.servantActivator_ = servantActivator_;
96
		this.poa_ = poa_;
97
		this.cleanupInProgress_ = cleanupInProgress_;
98
	}
99
    };
100
101
    
102
    
75
    protected AOM (boolean _unique, Logger _logger)
103
    protected AOM (boolean _unique, Logger _logger)
76
    {
104
    {
77
        unique = _unique;
105
        unique = _unique;
Lines 81-86 Link Here
81
        {
109
        {
82
            servantMap = new Hashtable();
110
            servantMap = new Hashtable();
83
        }
111
        }
112
	
113
	        Thread thread = new Thread("AOM_RemovalThread")
114
        {
115
        	
116
        	public void run()
117
        	{
118
        		while (true)
119
        		{
120
        			try
121
        			{
122
        				RemovalStruct rs = (RemovalStruct)removalQueue.take();
123
        				_remove(
124
        					rs.oid_,
125
        					rs.requestController_,
126
        					rs.servantActivator_,
127
        					rs.poa_,
128
        					rs.cleanupInProgress_
129
                               );
130
        				
131
        			}
132
        			catch (InterruptedException e)
133
        			{
134
        				throw new RuntimeException(e);
135
        			}
136
        			
137
        		}
138
        	}
139
        };
140
        thread.start();
141
84
    }
142
    }
85
143
86
144
Lines 366-386 Link Here
366
        final POA poa_ = poa;
424
        final POA poa_ = poa;
367
        final boolean cleanupInProgress_ = cleanupInProgress;
425
        final boolean cleanupInProgress_ = cleanupInProgress;
368
426
369
        Thread thread = new Thread("AOM_RemovalThread")
370
        {
371
            public void run()
372
            {
373
                _remove(
374
                    oid_,
375
                    requestController_,
376
                    servantActivator_,
377
                    poa_,
378
                    cleanupInProgress_
379
                       );
380
            }
381
        };
382
427
383
        thread.start();
428
        RemovalStruct rs = new RemovalStruct(oid_,
429
            requestController_,
430
            servantActivator_,
431
            poa_,
432
            cleanupInProgress_
433
               );
434
        
435
        try
436
	{
437
		removalQueue.put(rs);
438
	}
439
	catch (InterruptedException e)
440
	{
441
		throw new RuntimeException(e);
442
	}
443
384
    }
444
    }
385
445
386
446

Return to bug 801