From dev-return-80919-apmail-geronimo-dev-archive=geronimo.apache.org@geronimo.apache.org Mon Mar 15 05:26:47 2010 Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 51325 invoked from network); 15 Mar 2010 05:26:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Mar 2010 05:26:47 -0000 Received: (qmail 95481 invoked by uid 500); 15 Mar 2010 05:26:01 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 95280 invoked by uid 500); 15 Mar 2010 05:26:01 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 95273 invoked by uid 99); 15 Mar 2010 05:26:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 05:26:00 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ashjain2@gmail.com designates 209.85.222.191 as permitted sender) Received: from [209.85.222.191] (HELO mail-pz0-f191.google.com) (209.85.222.191) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 05:25:52 +0000 Received: by pzk29 with SMTP id 29so1899702pzk.27 for ; Sun, 14 Mar 2010 22:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=KBJQHioNpc4uWaic40A/jpXSvr3DqoWU4NyQ3wGu3rA=; b=THI0OmE6Zh1yquB/UDNHBdK19wwksmtp/q6uSELt9qpOIlV8g2lKvldmy66tel1z/v pvIi5Q9CufxmsilFdWgNaKkKGKBWSvL4X8PQnaPxxHO1H0O+E7M4lq+nuGq7dV0ExxbR yOjP1gBUVp9LF4EgvqSAtagsmvCRCV1Lso3as= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Vs+0veoaJPzsdL5Q3npvw9673c3DAlXSF2obOIJ5ZG34+0JgGV9dKKYFPVu/m+cPvj ijFMm20ofdBFk3XjoMmOCGoKAWWY8tpRI90Je1GaKmbEUmbYV6VMp4GHpzxVA3VWYafY I3dCOMTEbnm2QH4wI9Q+c2GskYz5QLpd50E3o= MIME-Version: 1.0 Received: by 10.114.242.20 with SMTP id p20mr519809wah.135.1268630731170; Sun, 14 Mar 2010 22:25:31 -0700 (PDT) In-Reply-To: <5e7fd1eb1003141948u44f23528hcb4363da2d3909b@mail.gmail.com> References: <14af40511003120048s6d66a2adse1f9cb54617b676@mail.gmail.com> <4B9A5AB7.9040203@earthlink.net> <14af40511003130120h183429dej1c9d0517bb254e56@mail.gmail.com> <5e7fd1eb1003141948u44f23528hcb4363da2d3909b@mail.gmail.com> Date: Mon, 15 Mar 2010 10:55:31 +0530 Message-ID: <14af40511003142225q47f62d98ja6dea2d1b5e934f5@mail.gmail.com> Subject: Re: Discussion: Possible fixes for GERONIMO-5180 From: Ashish Jain To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=00163646c9d81525120481d01c6a X-Virus-Checked: Checked by ClamAV on apache.org --00163646c9d81525120481d01c6a Content-Type: text/plain; charset=ISO-8859-1 The serialization problem is popping up due to the return type associated with getKeystores(). But in the case of getKeystores1() there is no return variable. So it helps in overcoming this problem. On Mon, Mar 15, 2010 at 8:18 AM, Jack Cai wrote: > I still don't quite understand Option 2. So what would be stored in this > new attribute "keystores1"? If it still contains an instance of > FileKeystoreInstance, then there is still a serialization problem. > > -Jack > > > On Sat, Mar 13, 2010 at 5:20 PM, Ashish Jain wrote: > >> Hi Joe, >> >> Thanks for your comments. The intent of using option #2 was to make use of >> getAttribute and also since modifying the KeystoreManager interface will not >> have any effect on any existing functionalities. However as you pointed out >> a get method w/o any return types may be misleading. >> >> Thanks >> Ashish >> >> >> On Fri, Mar 12, 2010 at 8:46 PM, Joe Bohn wrote: >> >>> I don't know much about the details of the problem but it seems to me >>> that you would either make the class serializable (option #1) or exclude it >>> from serialization if it is not necessary. I don't see how this would >>> impact any existing functions. So I guess I would vote for #1. >>> >>> I don't understand why you would want to have a "get*" method that >>> doesn't return anything - but perhaps I'm missing the point of option #2. >>> >>> Joe >>> >>> >>> >>> Ashish Jain wrote: >>> >>>> Hi ALL, >>>> >>>> I have opened up a JIRA GERONIMO-5180 on the unlockKeystore command >>>> failure if keystore is created with keytool.exe. I was trying to fix this >>>> issue >>>> which requires some changes in the class declaration or interface. >>>> Following code is being utilized to fix up the issue >>>> KeystoreInstance[] >>>> keystores=(KeystoreInstance[])kernel.getAttribute(abstractName,"keystores"); >>>> where abstractName is obtained through >>>> "org.apache.geronimo.management.geronimo.KeystoreManager". However I hit >>>> the following exception: >>>> >>>> java.rmi.UnmarshalException: error unmarshalling return; nested >>>> exception is: >>>> java.io.WriteAbortedException: writing aborted; >>>> java.io.NotSerializableE >>>> xception: org.apache.geronimo.security.keystore.FileKeystoreInstance >>>> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:172) >>>> at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) >>>> at >>>> javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(RMIConnecti >>>> onImpl_Stub.java:400) >>>> at >>>> javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection. >>>> invoke(RMIConnector.java:984) >>>> >>>> There are 2 ways to fix this up. >>>> >>>> 1) Make the class >>>> org.apache.geronimo.security.keystore.FileKeystoreInstance serializable. >>>> 2) add a new variable in FileKeystoreManager and add a new method in >>>> KeystoreManager which does not return anything and just gives a call >>>> to getKeystores(). For example getKeystores1() as the new method in >>>> KeystoreManager and a new variable as keystores1. >>>> >>>> I shall prefer #2 over #1 as it should not have any effect on existing >>>> functionalities. >>>> >>>> Suggestions/advice/comments?? >>>> >>>> Thanks >>>> Ashish >>>> >>> >>> >> > --00163646c9d81525120481d01c6a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The serialization problem is popping up due to the return type associated w= ith getKeystores(). But in the case of getKeystores1() there is no return v= ariable. So it helps in overcoming this problem.

On Mon, Mar 15, 2010 at 8:18 AM, Jack Cai <greensight@gmail.com> wrote:
=
I still don't quite understand Option 2. So what would be stored in thi= s new attribute "keystores1"? If it still contains an instance of= FileKeystoreInstance, then there is still a serialization problem.

-Jack


On Sat, Mar 13, 2010 at 5:20 PM, Ashish Jain <ashjain2@gmail.com> wrote:
Hi Joe,

Thanks for your comments. The intent of using option #2 was = to make use of getAttribute and also since modifying the KeystoreManager in= terface will not have any effect on any existing functionalities. However a= s you pointed out a get method w/o any return types may be misleading.

Thanks
Ashish

On Fri, Mar 12, 2010 at 8:46 PM, Joe Bohn <= span dir=3D"ltr"><joe.bohn@earthlink.net> wrote:
I don't know much about the details of the problem but it seems to me t= hat you would either make the class serializable (option #1) or exclude it = from serialization if it is not necessary. =A0I don't see how this woul= d impact any existing functions. =A0So I guess I would vote for #1.

I don't understand why you would want to have a "get*" method= that doesn't return anything - but perhaps I'm missing the point o= f option #2.

Joe



Ashish Jain wrote:
Hi ALL,

I have opened up a JIRA GERONIMO-5180 on the unlockKeystore command failure= if keystore is created with keytool.exe. I was trying to fix this issue which requires some changes in the class declaration or interface. Followin= g code is being utilized to fix up the issue
KeystoreInstance[] keystores=3D(KeystoreInstance[])kernel.getAttribute(abst= ractName,"keystores"); where =A0abstractName is obtained through<= br> "org.apache.geronimo.management.geronimo.KeystoreManager". Howeve= r I hit the following exception:

java.rmi.UnmarshalException: error unmarshalling return; nested exception i= s:
=A0 =A0 =A0 =A0java.io.WriteAbortedException: writing aborted; java.io.Not= SerializableE
xception: org.apache.geronimo.security.keystore.FileKeystoreInstance
=A0 =A0 =A0 =A0at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:172) =A0 =A0 =A0 =A0at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)<= br> =A0 =A0 =A0 =A0at javax.management.remote.rmi.RMIConnectionImpl_Stub.invok= e(RMIConnecti
onImpl_Stub.java:400)
=A0 =A0 =A0 =A0at javax.management.remote.rmi.RMIConnector$RemoteMBeanServ= erConnection.
invoke(RMIConnector.java:984)

There are 2 ways to fix this up.

1) Make the class org.apache.geronimo.security.keystore.FileKeystoreInstanc= e serializable.
2) add a new variable in FileKeystoreManager and add a new method in Keysto= reManager which does not return anything and just gives a call
to getKeystores(). For example getKeystores1() as the new method in Keystor= eManager and a new variable as keystores1.

I shall prefer #2 over #1 as it should not have any effect on existing func= tionalities.

Suggestions/advice/comments??

Thanks
Ashish




--00163646c9d81525120481d01c6a--