Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 14742 invoked from network); 16 May 2006 13:56:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 May 2006 13:56:20 -0000 Received: (qmail 7860 invoked by uid 500); 16 May 2006 13:56:18 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 7733 invoked by uid 500); 16 May 2006 13:56:18 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 7710 invoked by uid 99); 16 May 2006 13:56:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 May 2006 06:56:17 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 16 May 2006 06:56:08 -0700 Received: (qmail 14286 invoked by uid 65534); 16 May 2006 13:55:47 -0000 Message-ID: <20060516135547.14282.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r406944 [2/30] - in /incubator/harmony/enhanced/classlib/trunk/modules/rmi2: ./ build/ doc/ doc/testing/ doc/testing/rmi http tunneling/ doc/testing/rmi http tunneling/Results - ITC/ doc/testing/rmi http tunneling/Results - SUN/ doc/testing... Date: Tue, 16 May 2006 13:52:07 -0000 To: harmony-commits@incubator.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/Results - SUN/testusingproxyandwebserverwithcgi.pdf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/bashscripts.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/bashscripts.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/bashscripts.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration.pdf URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration.pdf?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration.pdf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/shorewall.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting1/machine1/shorewall.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/shorewall.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/squid.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting1/machine1/squid.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/squid.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/shorewall.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting2/machine1/shorewall.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/shorewall.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/squid.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting2/machine1/squid.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/squid.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/shorewall.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting3/machine1/shorewall.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/shorewall.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/squid.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting3/machine1/squid.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/squid.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine3/shorewall.zip URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting3/machine3/shorewall.zip?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine3/shorewall.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/index.pdf URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/index.pdf?rev=406944&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/index.pdf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/scripts.pdf URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/scripts.pdf?rev=406944&view=auto ============================================================================== Binary files /tmp/tmpfVf8Tf and /tmp/tmpnjG7TL differ Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license Tue May 16 06:51:00 2006 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license ------------------------------------------------------------------------------ svn:executable = * Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml Tue May 16 06:51:00 2006 @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml ------------------------------------------------------------------------------ svn:executable = * Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license Tue May 16 06:51:00 2006 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license ------------------------------------------------------------------------------ svn:executable = * Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license Tue May 16 06:51:00 2006 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license ------------------------------------------------------------------------------ svn:executable = * Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml Tue May 16 06:51:00 2006 @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml ------------------------------------------------------------------------------ svn:executable = * Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java Tue May 16 06:51:00 2006 @@ -0,0 +1,101 @@ +/* +*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. +* +*  Licensed under the Apache License, Version 2.0 (the "License"); +*  you may not use this file except in compliance with the License. +*  You may obtain a copy of the License at +* +*    http://www.apache.org/licenses/LICENSE-2.0 +* +*  Unless required by applicable law or agreed to in writing, software +*  distributed under the License is distributed on an "AS IS" BASIS, +*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +*  See the License for the specific language governing permissions and +*  limitations under the License. +*/ +package ar.org.fitc.rmi.dgc; + +import java.util.Timer; +import java.util.TimerTask; + +import ar.org.fitc.rmi.utils.PropertiesReader; + +/* + * NOTE: + * This class has been modified in order to support + * Java VM 1.4.2 using the javac's target jsr14 + */ + +/** + * This class schedules calls to the java.lang.System.gc() + * method. + * + * @author Gustavo Petri + */ +public class DGCScheduledGC { + + /** + * Timer to schedule the calls + */ + private Timer timer; + + /** + * The interval used by the Timer + */ + private static long gcInterval; + + /** + * Flag to indicate the termination of the Thread + */ + private static boolean running = false; + + static { + gcInterval = PropertiesReader.readLong( + "ar.org.fitc.rmi.dgc.gcInterval", 60000); + } + + /** + * Schedules the calls to java.lang.System.gc() + * + * @see + * Reference + */ + + private DGCScheduledGC() { + timer = new Timer(true); + try { + timer.schedule(new RunGCTask(), gcInterval, gcInterval); + } catch (Exception e) { + // There is no chance that this try will fail unless the runGC + // method be errased. + throw new AssertionError(); + } + running = true; + } + + /** + * Schedules and starts the calls to java.lang.System.gc() + * + * @see + * Reference + */ + public static synchronized final void startGC() { + if (!running) { + new DGCScheduledGC(); + } + } + + /** + * Runs the java.lang.System.gc() method. + */ + private class RunGCTask extends TimerTask { + + @Override + public void run() { + System.gc(); + } + } + +} Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java Tue May 16 06:51:00 2006 @@ -0,0 +1,410 @@ +/* +*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. +* +*  Licensed under the Apache License, Version 2.0 (the "License"); +*  you may not use this file except in compliance with the License. +*  You may obtain a copy of the License at +* +*    http://www.apache.org/licenses/LICENSE-2.0 +* +*  Unless required by applicable law or agreed to in writing, software +*  distributed under the License is distributed on an "AS IS" BASIS, +*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +*  See the License for the specific language governing permissions and +*  limitations under the License. +*/ +package ar.org.fitc.rmi.dgc.client; + +import java.lang.ref.WeakReference; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Proxy; +import java.rmi.Remote; +import java.rmi.UnmarshalException; +import java.rmi.dgc.Lease; +import java.rmi.dgc.VMID; +import java.rmi.server.ObjID; +import java.rmi.server.RemoteObjectInvocationHandler; +import java.rmi.server.RemoteRef; +import java.rmi.server.RemoteStub; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Map; +import java.util.Timer; +import java.util.WeakHashMap; + +import ar.org.fitc.rmi.dgc.DGCScheduledGC; +import ar.org.fitc.rmi.transport.Endpoint; +import ar.org.fitc.rmi.transport.TransportManager; +import ar.org.fitc.rmi.utils.Pair; +import ar.org.fitc.rmi.utils.PropertiesReader; + +/* + * NOTE: + * This class has been modified in order to support + * Java VM 1.4.2 using the javac's target jsr14 + */ + +/** + * Implements the client's side of the RMI Garbage Collector. This class takes + * care of scheduling and sending the dirty and clean calls to the server side + * of RMI DGC, when stubs of remote objects are received. + * + * @author Gonzalo Ortega + * + */ +public final class DGCClient { + + private static DGCClient dgcClient; + + private VMID vmID; + + private long sequenceNumber; + + private long leaseValue; + + private ObjID dgcObjID; + + private Map> stubsCacheTable; + + private Map> deserializedRemoteRefTable; + + private Map, Long> liveReferences; + + private Map dirtyTaskTable; + + private Timer taskScheduler; + + private DGCQueuePoll unreferencedPoll; + + /** The method hash for the "clean" method in the DGC */ + private static final long SEND_CLEAN_OP_NUM = -5803803475088455571L; + + /** The method hash for the "dirty" method in the DGC */ + private static final long SEND_DIRTY_OP_NUM = -8139341527526761862L; + + /** + * Implements the singleton behavior. If there is an instance of + * DGCClient is returned, else a new instance is created and + * returned. + * + * @return the only DGCClient instance + */ + public static synchronized final DGCClient getDGCClient() { + if (dgcClient == null) { + dgcClient = new DGCClient(); + } + return dgcClient; + } + + /** + * Creates a new instance of DGCClient. Launches the scheduler (as a daemon) + * that sends the dirty calls, and starts the monitor (as a daemon) that + * will look for unreferenced stubs. + */ + @Deprecated + private DGCClient() { + stubsCacheTable = new WeakHashMap>(); + deserializedRemoteRefTable = new WeakHashMap>(); + dirtyTaskTable = new HashMap(); + liveReferences = new Hashtable, Long>(); + + /* + * RMI API states that a client should use a null value if it is unable + * to generate a VMID. The only way to know if the generated VMID is + * somehow "unique" is calling the deprecated VMID.isUnique() method, as + * long the VMID constructor doesn't throw any exception. (it always + * success) + */ + if (VMID.isUnique()) { + vmID = new VMID(); + } + sequenceNumber = 0; + leaseValue = 600000L; + dgcObjID = new ObjID(ObjID.DGC_ID); + + + + String propertyValue = + PropertiesReader.readString("java.rmi.dgc.leaseValue"); + if (propertyValue != null) { + try { + leaseValue = Long.parseLong(propertyValue); + } catch (NumberFormatException e) { + } + } + + taskScheduler = new Timer(true); + + unreferencedPoll = new DGCQueuePoll(this); + unreferencedPoll.setDaemon(true); + unreferencedPoll.setName("rmi.dgc.client.unreferencedStubPoll"); + unreferencedPoll.start(); + + DGCScheduledGC.startGC(); + } + + /** + * Stores the data received during the deserialization of a stub. The + * Endpoint and ObjID from the remote + * reference are stored in order to be used to send dirty and clean calls + * grouped by Endpoint. + * + * @param ref + * The reference received from the stream. + * @param ep + * The Endpoint that corresponds to the reference. + * @param objID + * The ObjID that corresponds to the reference. + */ + public synchronized final void registerRemoteRef(RemoteRef ref, Endpoint ep, + ObjID objID) { + if (!deserializedRemoteRefTable.containsKey(ref)) { + deserializedRemoteRefTable.put(ref, new Pair(ep, + objID)); + } + return; + } + + /** + * If the received stub is the first instance of that stub in the client’s + * system, it is cached and returned. The method + * activateReference is called in order to start the lease + * renewal process. If there is a previous instance of this stub in the + * system, the received stub is discarded and the cached instance is + * returned. + * + * @param stub + * The stub received during deserialization process. + * @return The unique instance of this stub in the client's system. + * @throws UnmarshalException + * If there is missing information or the dirty call for the + * received stub fails. + */ + public synchronized Remote getStubInstance(Remote stub) + throws UnmarshalException { + // Get internal RemoteRef from stub + RemoteRef ref = null; + if (stub instanceof RemoteStub) { + ref = ((RemoteStub) stub).getRef(); + } + if (Proxy.isProxyClass(stub.getClass())) { + InvocationHandler ih = Proxy.getInvocationHandler(stub); + if (ih instanceof RemoteObjectInvocationHandler) { + ref = ((RemoteObjectInvocationHandler) ih).getRef(); + } + } + // Check whether there is a stub already registered in the DGC + WeakReference weakStub; + if ((weakStub = stubsCacheTable.get(stub)) != null) { + Remote cachedStub = weakStub.get(); + if (cachedStub != null) { + checkLiveness(ref); + return cachedStub; + } + } + Pair data = activateReference(ref); + weakStub = unreferencedPoll.addToReferenceQueue(stub, data); + stubsCacheTable.put(stub, weakStub); + return stub; + } + + /** + * Sends the first dirty for a received reference in order to get the + * appropiate lease time from the server, and then schedules the dirty call + * for lease renewal. If the first dirty message fails, a clean "strong" + * message is sent for that remote object. If the first dirty call + * succeeded, the reference becomes a "live" reference for the client DGC. + * + * @param ref + * The reference received inside the stub + * @return The Endpoint / ObjID pair contained inside the + * reference + * @throws UnmarshalException + * If the first dirty call fails + */ + private final Pair activateReference(RemoteRef ref) + throws UnmarshalException { + // Get necessary data previously stored during RemoteRef + // deserialization. + Pair data = deserializedRemoteRefTable.get(ref); + if (data == null) { + throw new UnmarshalException( + "Impossible to get a stub for this object."); + } + Lease lease = sendDirty(data.getFirst(), + new ObjID[] { data.getSecond() }); + + if (lease != null) { + enqueueDirtyCall(data, lease.getValue()); + liveReferences.put(data, new Long(lease.getValue())); + return data; + } else { + sendClean(data.getFirst(), new ObjID[] { data.getSecond() }, true); + throw new UnmarshalException( + "Impossible to get a stub for this object."); + } + } + + /** + * Checks whether the received reference is a "live" reference for the + * client garbage collector. The client DGC sends dirties for all "live" + * references in order to renew the lease with the remote server. If the DGC + * is not sending dirties for a reference (because of persistent network + * problems, for instance) that reference is no longer considered "live". If + * the received reference is not "live", the method + * activateReference will be called in order to restart the + * lease renewal process. + * + * @param ref + * The reference to be tested + */ + public synchronized final void checkLiveness(RemoteRef ref) { + Pair dataRef = deserializedRemoteRefTable.get(ref); + if (liveReferences.containsKey(dataRef)) { + return; + } + try { + activateReference(ref); + } catch (UnmarshalException e) { + // An Exception was thrown trying to bring the reference back to + // life + } + } + + /** + * Schedules a dirty call to be sent periodically. The dirty call will be + * sent every period / 2 milliseconds. + * + * @param data + * An Endpoint / ObjID pair representing a + * reference. + * @param period + * The lease period granted by the server. + */ + void enqueueDirtyCall(Pair data, long period) { + synchronized (dirtyTaskTable) { + DirtyTask task = dirtyTaskTable.get(new Long(period)); + if (task != null) { + task.scheduleDirty(data); + } else { + task = new DirtyTask(this, period, taskScheduler, + dirtyTaskTable); + task.scheduleDirty(data); + taskScheduler.schedule(task, period / 2, period / 2); + dirtyTaskTable.put(new Long(period), task); + } + } + } + + /** + * Removes the reference represented by the Endpoint / ObjID + * pair from the dirty calls scheduler. No more dirties will be sent for + * that reference, and the reference is erased from the "live" references + * internal table. + * + * @param ep + * The Endpoint of the remote reference. + * @param objID + * The ObjID of the remote reference. + */ + void cancelDirtyCall(Endpoint ep, ObjID objID) { + synchronized (dirtyTaskTable) { + Pair dataRef = new Pair(ep, objID); + Long period = liveReferences.get(dataRef); + DirtyTask task = dirtyTaskTable.get(period); + if (task != null) { + task.cancelDirty(ep, objID); + if (task.isEmpty()) { + task.cancel(); + dirtyTaskTable.remove(period); + /* SEE DISCLAIMER */ + //taskScheduler.purge(); + } + } + liveReferences.remove(dataRef); + } + } + + /** + * Removes the reference represented by the Endpoint / ObjID + * pair from the "live" references internal table. + * + * @param dataRef + * The Endpoint / ObjID pair representing the + * reference + */ + void removeFromLiveReferences(Pair dataRef) { + liveReferences.remove(dataRef); + } + + /** + * Checks whether the reference represented by the + * Endpoint / ObjID pair is a "live" reference. The client + * DGC sends dirties for all "live" references in order to renew the lease + * with the remote server. + * + * @param dataRef + * An Endpoint / ObjID pair representing a + * reference + * @return true if the received pair is a "live" reference + */ + boolean isLiveReference(Pair dataRef) { + return liveReferences.containsKey(dataRef); + } + + /** + * Sends a clean call to the DGC of the remote server. + * + * @param ep + * The Endpoint where the clean call will be sent. + * @param obj + * An array containing the object identifiers that will be sent + * in the clean call. + * @param strong + * The flag that indicates a 'strong' clean call + */ + void sendClean(Endpoint ep, ObjID[] obj, boolean strong) { + synchronized(dgcObjID) { + Object[] args = new Object[] { obj, ++sequenceNumber, vmID, strong }; + TransportManager tm = TransportManager.getTransportManager(); + try { + tm.invoke(dgcObjID, ep, args, SEND_CLEAN_OP_NUM, false); + } catch (Exception e) { + // The clean call has failed. + } + } + } + + /** + * Sends a dirty call to the DGC of the remote server, and returns the + * Lease granted by that DGC. + * + * @param ep + * The Endpoint where the dirty call will be sent. + * @param obj + * An array containing the object identifiers that will be sent + * in the dirty call. + * @return The Lease returned from the server DGC, or + * null if the call has failed. + */ + Lease sendDirty(Endpoint ep, ObjID[] obj) { + synchronized(dgcObjID) { + Lease lease = new Lease(vmID, leaseValue); + Object[] args = new Object[] { obj, ++sequenceNumber, lease }; + TransportManager tm = TransportManager.getTransportManager(); + Object response; + try { + response = tm.invoke(dgcObjID, ep, args, SEND_DIRTY_OP_NUM, true); + if (response instanceof Lease) { + if (vmID == null) { + vmID = ((Lease) response).getVMID(); + } + return (Lease) response; + } + return null; + } catch (Exception e) { + return null; + } + } + } +} Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java Tue May 16 06:51:00 2006 @@ -0,0 +1,153 @@ +/* +*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. +* +*  Licensed under the Apache License, Version 2.0 (the "License"); +*  you may not use this file except in compliance with the License. +*  You may obtain a copy of the License at +* +*    http://www.apache.org/licenses/LICENSE-2.0 +* +*  Unless required by applicable law or agreed to in writing, software +*  distributed under the License is distributed on an "AS IS" BASIS, +*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +*  See the License for the specific language governing permissions and +*  limitations under the License. +*/ +package ar.org.fitc.rmi.dgc.client; + +import java.lang.ref.ReferenceQueue; +import java.lang.ref.WeakReference; +import java.rmi.Remote; +import java.rmi.server.ObjID; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Map; + +import ar.org.fitc.rmi.transport.Endpoint; +import ar.org.fitc.rmi.utils.Pair; + +/* + * NOTE: + * This class has been modified in order to support + * Java VM 1.4.2 using the javac's target jsr14 + */ + +/** + * This class sends the corresponding "clean" call to the remote server’s + * garbage collector when a stub with a "live" reference is collected by the + * local garbage collector. + * + * @author Gonzalo Ortega + * + */ +final class DGCQueuePoll extends Thread { + + private ReferenceQueue stubsQueue; + + private Map> referenceDataTable; + + private DGCClient dgc; + + private Map> queuedCleanCalls; + + /** + * Creates a new instance of DGCQueuePoll. + * + * @param cdgc + * The client garbage collector which has instantiated this + * class. + */ + public DGCQueuePoll(DGCClient cdgc) { + stubsQueue = new ReferenceQueue(); +// referenceDataTable = new Hashtable>(); + referenceDataTable = new Hashtable>(); + queuedCleanCalls = new HashMap>(); + dgc = cdgc; + } + + /** + * Adds a stub to the internal reference queue, in order to be detected when + * it is garbage collected by the local garbage collector. + * + * @param stub + * The stub that the clean call will be sent for. + * @param data + * The Endpoint / ObjID pair representing the + * internal data of the remote reference contained inside the + * stub. + * @return A weak reference to the stub. + */ + public final WeakReference addToReferenceQueue(Remote stub, + Pair data) { + WeakReference weakStub; + weakStub = new WeakReference(stub, stubsQueue); + referenceDataTable.put(weakStub, data); + return weakStub; + } + + /** + * Waits for the local garbage collector to collect a stub, and then removes + * the reference corresponding to that stub from the Client DGC's "live" + * references table, stops sending dirty calls for that reference, and sends + * a clean call for that reference to te remote server's garbage collector. + * + */ + @SuppressWarnings("unchecked") + public final void run() { + while (true) { + try { + WeakReference remove = (WeakReference) stubsQueue + .remove(); + do { + Pair data = referenceDataTable.get(remove); + if (dgc.isLiveReference(data)) { + dgc.cancelDirtyCall(data.getFirst(), data.getSecond()); + enqueueCleanCall(data.getFirst(), data.getSecond()); + } + referenceDataTable.remove(remove); + } while ((remove = (WeakReference) stubsQueue.poll()) + != null); + sendQueuedCalls(); + } catch (InterruptedException e) { + } + } + } + + /** + * Groups the clean calls to be sent by Endpoint, in order + * to send only one clean call for all the objects exported in the same + * Endpoint. + * + * @param ep + * The Endpoint of the reference. + * @param objID + * The ObjID of the reference. + */ + private final void enqueueCleanCall(Endpoint ep, ObjID objID) { + ArrayList objIDList; + objIDList = queuedCleanCalls.get(ep); + if (objIDList == null) { + objIDList = new ArrayList(); + queuedCleanCalls.put(ep, objIDList); + } + objIDList.add(objID); + } + + /** + * Sends all the grouped clean calls to the remote server's garbage + * collector. + */ + private final void sendQueuedCalls() { + if (!queuedCleanCalls.isEmpty()) { + ArrayList objIDList; + for (Endpoint ep : queuedCleanCalls.keySet()) { + objIDList = queuedCleanCalls.get(ep); + ObjID[] objArray = new ObjID[objIDList.size()]; + objIDList.toArray(objArray); + dgc.sendClean(ep, objArray, false); + } + queuedCleanCalls.clear(); + } + } +} \ No newline at end of file Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java?rev=406944&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java Tue May 16 06:51:00 2006 @@ -0,0 +1,116 @@ +/* + *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + *  Licensed under the Apache License, Version 2.0 (the "License"); + *  you may not use this file except in compliance with the License. + *  You may obtain a copy of the License at + * + *    http://www.apache.org/licenses/LICENSE-2.0 + * + *  Unless required by applicable law or agreed to in writing, software + *  distributed under the License is distributed on an "AS IS" BASIS, + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + *  See the License for the specific language governing permissions and + *  limitations under the License. + */ +package ar.org.fitc.rmi.dgc.client; + +import java.rmi.server.ObjID; +import java.util.Timer; +import java.util.TimerTask; + +import ar.org.fitc.rmi.transport.Endpoint; +import ar.org.fitc.rmi.utils.Pair; + +/** + * When scheduled dirty calls fail, the dirty retry process uses instances of + * this class to attempt to get a lease from the server. A Timer + * should run this task in order to send the dirties for renewing the leases + * periodically. + * + * @author Gonzalo Ortega + * + */ +final class DirtyRetryTask extends TimerTask { + + private DGCClient dgc; + + private long originalPeriod; + + private Timer taskScheduler; + + private Endpoint ep; + + private ObjID[] objIDs; + + private int retryNumber; + + private static final int retriesAllowed = 4; + + /** + * Creates a new instance of DirtyRetryTask. + * + * @param dgc + * The client DGC. + * @param period + * The original period in milliseconds of the lease granted to + * the references grouped in the DirtyTask wich + * has isntantiated this task. + * @param taskScheduler + * The Timer object which will run this scheduled + * DirtyTask. + * @param ep + * The Endpoint of the references grouped in the + * failed dirty call. + * @param objIDs + * The ObjID of the references drouped in the + * failed dirty call. + * @param retryNumber + * The number of times the dirty call has been retried. + */ + public DirtyRetryTask(DGCClient dgc, long period, Timer taskScheduler, + Endpoint ep, ObjID[] objIDs, int retryNumber) { + this.dgc = dgc; + this.originalPeriod = period; + this.taskScheduler = taskScheduler; + this.ep = ep; + this.objIDs = objIDs; + this.retryNumber = ++retryNumber; + } + + /** + * This DirtyRetryTask will try to re-send the dirty call to + * the detination Endpoint. If this dirty call success, the + * references will be re-scheduled for normal lease renewal. If the dirty + * call fails, a new DirtyRetryTask will be scheduled with an + * exponential delay time for a new retry. If four retry attempts have been + * made and the retry call still hasn't succeeded, no more dirties for those + * references will be sent. The references will be removed from the DGC + * "live" references table and a clean "strong" call will be sent to the + * remote server's DGC. + */ + @Override + public final void run() { + if (dgc.sendDirty(ep, objIDs) != null) { + for (ObjID objID : objIDs) { + dgc.enqueueDirtyCall(new Pair(ep, objID), + originalPeriod); + } + } else { + if (retryNumber < retriesAllowed) { + DirtyRetryTask retryTask = new DirtyRetryTask(dgc, + originalPeriod, taskScheduler, ep, objIDs, retryNumber); + taskScheduler.schedule(retryTask, Double.valueOf( + (Math.pow(2, retryNumber))).longValue() * 1000); + } else { + // Giving up on dirties. Sending clean strong call for the + // references. + for (ObjID objID : objIDs) { + dgc.removeFromLiveReferences(new Pair(ep, + objID)); + } + dgc.sendClean(ep, objIDs, true); + } + } + } +}