You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "David J. M. Karlsen" <da...@davidkarlsen.com> on 2005/05/24 03:11:56 UTC

Concurrency problems with PooledProxy?

Hi!

I'm stress-testing my API which uses HiveMind pooled service-model for 
my services.

I'm putting some test-objects which implement Runnable into a pooled 
executor.
The test-objects call different Hivemind services within the run() 
method; all of them with a "pooled" service-model.

At high loads (about 60 concurrent threads in the executor) - these 
messages starts to appear:

java.lang.IncompatibleClassChangeError
at $PooledProxy_1040bfb05ed_35.toString($PooledProxy_1040bfb05ed_35.java)
at $Interceptor_1040bfb060f_36.toString($Interceptor_1040bfb060f_36.java)
at java.lang.String.valueOf(String.java:2013)
at java.lang.StringBuffer.append(StringBuffer.java:365)
at 
test.RandomFunctionsForPerson.myFunction(RandomFunctionsForPerson.java:153)
at test.RandomFunctionsForPerson.run(RandomFunctionsForPerson.java:67)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
Source)
at java.lang.Thread.run(Thread.java:479)



which indicates PooledProxy having problems at the toString method?

Have anybody else discovered the same?

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Concurrency problems with PooledProxy?

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Knut Wannheden wrote:
> David,
> 
> I think this might be a bug. Could you provide a complete test case
> exposing this behaviour?


Sorry - not really - i's my customers code :-)
Shouldn't be any need for it either.


But, it's something like this:


My runnable object ("class Runner"):


....
void run(){

try {
//a series of this:
	MyService service = Registry.getService(MyService.class);
	//use service
	log(service);  //implicit call of toString()
}




And the main-class:

EDU.oswego.cs.dl.util.concurrent.PooledExecutor pool = new 
PooledExecutor(60);

Stack users;

while (!users.isEmpty){

	pool.execute( new Runner(users.pop()) );
}


All the service-interfaces I use extend a common interface.
All the implementing classes of these interfaces extend a common 
abstract class (implementing the common interface - and leaving some 
methods as abstracts to be implemented by the end-class.)
And - importantly - the toString() is declared in the common interface - 
and implemented by the abstract common class. This might be the problem???


I'll build to versions for the next test - one with the toString() in 
the common interface - and one with toString() left out - and see if it 
disappears.

-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Concurrency problems with PooledProxy?

Posted by Knut Wannheden <kn...@gmail.com>.
David,

I think this might be a bug. Could you provide a complete test case
exposing this behaviour?

Thanks,

--knut

On 5/24/05, David J. M. Karlsen <da...@davidkarlsen.com> wrote:
> Hi!
> 
> I'm stress-testing my API which uses HiveMind pooled service-model for
> my services.
> 
> I'm putting some test-objects which implement Runnable into a pooled
> executor.
> The test-objects call different Hivemind services within the run()
> method; all of them with a "pooled" service-model.
> 
> At high loads (about 60 concurrent threads in the executor) - these
> messages starts to appear:
> 
> java.lang.IncompatibleClassChangeError
> at $PooledProxy_1040bfb05ed_35.toString($PooledProxy_1040bfb05ed_35.java)
> at $Interceptor_1040bfb060f_36.toString($Interceptor_1040bfb060f_36.java)
> at java.lang.String.valueOf(String.java:2013)
> at java.lang.StringBuffer.append(StringBuffer.java:365)
> at
> test.RandomFunctionsForPerson.myFunction(RandomFunctionsForPerson.java:153)
> at test.RandomFunctionsForPerson.run(RandomFunctionsForPerson.java:67)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:479)
> 
> 
> 
> which indicates PooledProxy having problems at the toString method?
> 
> Have anybody else discovered the same?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org