hi james,
the error message does not occur any more. But the objects are still
not being pooled. my testcode looks like this:
public class PoolTest implements Runnable {
public static Registry registry = null;
public static void main(String[] args) throws InterruptedException {
registry = RegistryBuilder.constructDefaultRegistry();
Thread[] a = new Thread[10];
for(int i=0;i<a.length;i++) a[i] = new Thread(new PoolTest());
for(Thread t: a) t.start();
for(Thread t: a) t.join();
for(int i=0;i<a.length;i++) a[i] = new Thread(new PoolTest());
for(Thread t: a) t.start();
for(Thread t: a) t.join();
....
public void run() {
IPooledObject o = (IPooledObject) registry
.getService("cross.pooledObject",IPooledObject.class);
System.out.println("ObjectID: " + o.getValue());
}
I'm getting 20 different object ids. i'd except to have less than 20
different object ids :)
g,
kris
"James Carman"
<[EMAIL PROTECTED]
ulting.com> An
"'Tapestry users'"
28.07.2006 13:32 <[email protected]>
Kopie
Bitte antworten Thema
an RE: Hivemind: creating a pooled
"Tapestry users" service
<[EMAIL PROTECTED]
pache.org>
FYI, the HiveMind mailing lists have been moved. We are moving to an
Apache
top-level project, but we haven't moved the website yet. Anyway, have you
tried this:
<service-point id="pooledObjectProvider"
interface="org.apache.hivemind.ServiceImplementationFactory"
paramaters-occurs="none" />
This tells HiveMind that your implementation factory doesn't expect any
parameters.
-----Original Message-----
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED]
Sent: Friday, July 28, 2006 6:28 AM
To: Tapestry users
Subject: Hivemind: creating a pooled service
hi,
could someone tell me howto configure hivemind to get me a
object with a "pooled" lifecycle which, if the pool is empty, uses
a own factory or provider to generate it?
my configuration doesn't pool the object and returns a
"Parameters to service implementation factory
pooledObjectProvider contains no contributions
but expects exactly one contribution." error
message
<service-point id="pooledObject"
interface="pool.IPooledObject" />
<service-point id="pooledObjectProvider"
interface="org.apache.hivemind.ServiceImplementationFactory" />
<implementation service-id="pooledObjectProvider">
<invoke-factory model="singleton">
<construct class="pool.PooledObjectProvider" />
</invoke-factory>
</implementation>
<implementation service-id="pooledObject">
<invoke-factory model="pooled"
service-id="pooledObjectProvider" />
</implementation>
g,
kris
P.S. i always get a failure notive when i try to subscribe to the hivemind
mailinglist
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]