The signature must be in the same form as returned by Class.getName(), like

String[] signature = { "[Ljava.lang.String;", "[Ljava.lang.String;" };

See Javadoc of JDK for more details.

-- Ilkka


Gaasch, Derek wrote:
I'm trying to figure out how exactly to use PoolService (and perhaps
ArrayCtorRecyclable) to create a recycleable object to use with PoolService.

The object I want to recycle requires a constructor which takes 2 String
arrays.


public SomeObject(String[] arr1, String[] arr2)
{
}

Anyone have any success with this? Basically, what I am doing (which keeps
giving me an instantiation exception) is:

String[] p1 = {"p1test1","p1test2"};
String[] p2 = {"p2test1","p2test2"};
Object[] params = {p1,p2};
String[] signature = {"String[]","String[]"};

SomeObject so  =
(SomeObject)TurbinePool.getInstance("org.blah.SomeObject",params,signature);


Any help will be most welcome! Thanks.


-d

---------------------------------------------------------------------
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]



Reply via email to