smartcc-cvs Mailing List for Smart Client Container (Page 3)
Brought to you by:
hengels
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(19) |
Jun
(59) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <he...@us...> - 2002-06-07 09:42:55
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc/replay In directory usw-pr-cvs1:/tmp/cvs-serv3001/src/org/smartcc/replay Modified Files: Client.java Coder.java HTTPClient.java JBossClient.java MultiplexedAuthenticator.java Recorder.java RecordingInterceptor.java Script.java Simulator.java Log Message: o added LGPL header and emacs footer Index: Client.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Client.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Client.java 29 May 2002 08:12:12 -0000 1.1 --- Client.java 7 Jun 2002 09:42:10 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 109,110 **** --- 122,129 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: Coder.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Coder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Coder.java 29 May 2002 08:12:12 -0000 1.2 --- Coder.java 7 Jun 2002 09:42:10 -0000 1.3 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 198,199 **** --- 211,218 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: HTTPClient.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/HTTPClient.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HTTPClient.java 29 May 2002 08:12:12 -0000 1.1 --- HTTPClient.java 7 Jun 2002 09:42:10 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 28,29 **** --- 41,48 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: JBossClient.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/JBossClient.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JBossClient.java 29 May 2002 08:12:12 -0000 1.1 --- JBossClient.java 7 Jun 2002 09:42:10 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 15,16 **** --- 28,35 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: MultiplexedAuthenticator.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/MultiplexedAuthenticator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MultiplexedAuthenticator.java 29 May 2002 08:12:12 -0000 1.1 --- MultiplexedAuthenticator.java 7 Jun 2002 09:42:10 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 22,23 **** --- 35,42 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: Recorder.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Recorder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Recorder.java 29 May 2002 08:12:12 -0000 1.2 --- Recorder.java 7 Jun 2002 09:42:11 -0000 1.3 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 100,101 **** --- 113,120 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: RecordingInterceptor.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/RecordingInterceptor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RecordingInterceptor.java 29 May 2002 15:12:08 -0000 1.3 --- RecordingInterceptor.java 7 Jun 2002 09:42:11 -0000 1.4 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 25,26 **** --- 38,45 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: Script.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Script.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Script.java 29 May 2002 08:12:12 -0000 1.1 --- Script.java 7 Jun 2002 09:42:11 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 63,64 **** --- 76,83 ---- public abstract void execute() throws Exception; } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: Simulator.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Simulator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Simulator.java 29 May 2002 08:12:12 -0000 1.1 --- Simulator.java 7 Jun 2002 09:42:11 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.replay; *************** *** 131,132 **** --- 144,151 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ |
Update of /cvsroot/smartcc/smartcc/src/tyrex/naming In directory usw-pr-cvs1:/tmp/cvs-serv3001/src/tyrex/naming Modified Files: MemoryBinding.java MemoryContext.java MemoryContextFactory.java ReferenceRefAddr.java Log Message: o added LGPL header and emacs footer Index: MemoryBinding.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/tyrex/naming/MemoryBinding.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MemoryBinding.java 27 May 2002 16:22:02 -0000 1.1.1.1 --- MemoryBinding.java 7 Jun 2002 09:42:11 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ /** * Redistribution and use of this software and associated documentation *************** *** 680,681 **** --- 693,700 ---- } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: MemoryContext.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/tyrex/naming/MemoryContext.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MemoryContext.java 27 May 2002 16:22:03 -0000 1.1.1.1 --- MemoryContext.java 7 Jun 2002 09:42:12 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ /** * Redistribution and use of this software and associated documentation *************** *** 1164,1165 **** --- 1177,1184 ---- + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: MemoryContextFactory.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/tyrex/naming/MemoryContextFactory.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MemoryContextFactory.java 27 May 2002 16:22:02 -0000 1.1.1.1 --- MemoryContextFactory.java 7 Jun 2002 09:42:13 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ /** * Redistribution and use of this software and associated documentation *************** *** 146,147 **** --- 159,166 ---- } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ Index: ReferenceRefAddr.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/tyrex/naming/ReferenceRefAddr.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ReferenceRefAddr.java 27 May 2002 16:22:03 -0000 1.1.1.1 --- ReferenceRefAddr.java 7 Jun 2002 09:42:13 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ /** * Redistribution and use of this software and associated documentation *************** *** 335,336 **** --- 348,355 ---- */ } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ |
|
From: <he...@us...> - 2002-06-07 09:42:53
|
Update of /cvsroot/smartcc/smartcc/test/src/org/smartcc/jndi In directory usw-pr-cvs1:/tmp/cvs-serv3001/test/src/org/smartcc/jndi Modified Files: TestJNDIProvider.java Log Message: o added LGPL header and emacs footer Index: TestJNDIProvider.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/test/src/org/smartcc/jndi/TestJNDIProvider.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TestJNDIProvider.java 27 May 2002 16:22:03 -0000 1.1.1.1 --- TestJNDIProvider.java 7 Jun 2002 09:42:17 -0000 1.2 *************** *** 1,2 **** --- 1,15 ---- + /* + * $Id$ + * (c) Copyright 2002 Holger Engels. + * + * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). + * + * SmartCC is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * Please see COPYING for the complete licence. + */ package org.smartcc.jndi; *************** *** 105,106 **** --- 118,125 ---- } } + /* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ |
|
From: <he...@us...> - 2002-06-07 09:41:33
|
Update of /cvsroot/smartcc/smartcc
In directory usw-pr-cvs1:/tmp/cvs-serv3001
Added Files:
COPYING
Log Message:
o added LGPL header and emacs footer
--- NEW FILE: COPYING ---
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
|
|
From: <he...@us...> - 2002-06-07 09:36:56
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc
In directory usw-pr-cvs1:/tmp/cvs-serv2222/src/org/smartcc
Modified Files:
HTTPConnector.java HTTPTransport.java
Log Message:
o minor changes
Index: HTTPConnector.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/HTTPConnector.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HTTPConnector.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- HTTPConnector.java 7 Jun 2002 09:36:51 -0000 1.2
***************
*** 31,35 ****
/**
! * State, that the servle is operational.
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
--- 31,35 ----
/**
! * State, that the servlet is operational.
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
***************
*** 61,69 ****
log("EJB Remote: " + remoteClass.getName());
}
! catch (Exception e){
out.println("<b>EJB:</b> lookup failed<br/>");
log("EJB: lookup failed");
}
out.println("</body>");
out.println("</html>");
--- 61,81 ----
log("EJB Remote: " + remoteClass.getName());
}
! catch (Exception e) {
out.println("<b>EJB:</b> lookup failed<br/>");
log("EJB: lookup failed");
}
+ if ("true".equals(getInitParameter("jndi.list.enabled"))) {
+ try {
+ out.println("<b>JNDI:</b><br>");
+ out.println("<pre>");
+ list(out, context, " ", true);
+ out.println("</pre>");
+ }
+ catch (Exception e) {
+ out.println("<b>JNDI:</b><br>jndi list failed<br/>");
+ log("EJB: jndi list failed");
+ }
+ }
out.println("</body>");
out.println("</html>");
***************
*** 175,178 ****
--- 187,250 ----
try { out.close(); } catch (Exception e) { /* ignore */ }
}
+ }
+
+ public static void list(PrintWriter out, Context ctx, String indent, boolean verbose)
+ throws NamingException
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ NamingEnumeration ne = ctx.list("");
+ while (ne.hasMore()) {
+ NameClassPair pair = (NameClassPair)ne.next();
+ boolean recursive = false;
+ boolean isLinkRef = false;
+ try {
+ Class c = loader.loadClass(pair.getClassName());
+ if (Context.class.isAssignableFrom(c))
+ recursive = true;
+ if (LinkRef.class.isAssignableFrom(c))
+ isLinkRef = true;
+ }
+ catch (ClassNotFoundException cnfe) {
+ }
+
+ String name = pair.getName();
+ out.print(indent + " +- " + name);
+ if (isLinkRef) {
+ try {
+ LinkRef link = (LinkRef) ctx.lookupLink(name);
+ out.print("[link -> ");
+ out.print(link.getLinkName());
+ out.print(']');
+ }
+ catch (Throwable e) {
+ e.printStackTrace();
+ out.print("[invalid]");
+ }
+ } else {
+ out.print(" (value: " + ctx.lookup(name) +")");
+ }
+ if (verbose)
+ out.print(" (class: " + pair.getClassName()+")");
+ out.print('\n');
+ if (recursive) {
+ try {
+ Object value = ctx.lookup(name);
+ if (value instanceof Context) {
+ Context subctx = (Context) value;
+ list(out, subctx, indent + " | ", verbose);
+ }
+ else {
+ out.print(indent + " | NonContext: "+value);
+ out.print('\n');
+ }
+ }
+ catch (Throwable t) {
+ out.print("Failed to lookup: "+name+", errmsg="+t.getMessage());
+ out.print('\n');
+ }
+ }
+ }
+ ne.close();
}
}
Index: HTTPTransport.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/HTTPTransport.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HTTPTransport.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- HTTPTransport.java 7 Jun 2002 09:36:51 -0000 1.2
***************
*** 18,26 ****
{
/**
! * A Transport interceptor is always the last in interceptor in the chain.
*/
public void setNext(Interceptor interceptor) {}
/**
! * A Transport interceptor is always the last in interceptor in the chain.
*/
public Interceptor getNext() { return null; }
--- 18,26 ----
{
/**
! * A Transport interceptor is always the last interceptor in the chain.
*/
public void setNext(Interceptor interceptor) {}
/**
! * A Transport interceptor is always the last interceptor in the chain.
*/
public Interceptor getNext() { return null; }
***************
*** 34,39 ****
throws Throwable
{
- System.out.println("invocation: " + invocation.getMethod());
- // invokeHome
SmartRef smartRef = (SmartRef)invocation.getValue(Invocation.SMARTREF);
HttpURLConnection connection = null;
--- 34,37 ----
|
|
From: <he...@us...> - 2002-06-07 09:36:56
|
Update of /cvsroot/smartcc/smartcc/doc In directory usw-pr-cvs1:/tmp/cvs-serv2222/doc Modified Files: TODO Log Message: o minor changes Index: TODO =================================================================== RCS file: /cvsroot/smartcc/smartcc/doc/TODO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TODO 29 May 2002 15:12:07 -0000 1.3 --- TODO 7 Jun 2002 09:36:51 -0000 1.4 *************** *** 7,8 **** --- 7,9 ---- o SOAPTransport o JBoss optimized transport + o run as |
|
From: <he...@us...> - 2002-06-07 09:36:56
|
Update of /cvsroot/smartcc/smartcc/test/etc/client
In directory usw-pr-cvs1:/tmp/cvs-serv2222/test/etc/client
Modified Files:
Test-smart-client.xml
Log Message:
o minor changes
Index: Test-smart-client.xml
===================================================================
RCS file: /cvsroot/smartcc/smartcc/test/etc/client/Test-smart-client.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Test-smart-client.xml 29 May 2002 08:12:13 -0000 1.2
--- Test-smart-client.xml 7 Jun 2002 09:36:51 -0000 1.3
***************
*** 6,9 ****
--- 6,15 ----
<smart-ref>
<ejb-ref-name>ejb/RemoteTest</ejb-ref-name>
+ <transport>org.smartcc.SOAPTransport</transport>
+ <lookup>ejb/RemoteTest</lookup>
+ <properties>
+ org.smartcc.connector.url=http://localhost:8080/HTTPConnector/
+ </properties>
+ <!--
<transport>org.smartcc.RMITransport</transport>
<lookup>ejb/RemoteTest</lookup>
***************
*** 12,15 ****
--- 18,22 ----
java.naming.provider.url=jnp://localhost:1099
</properties>
+ -->
<!--
<transport>org.smartcc.HTTPTransport</transport>
|
|
From: <he...@us...> - 2002-06-07 09:36:56
|
Update of /cvsroot/smartcc/smartcc/test/etc/war
In directory usw-pr-cvs1:/tmp/cvs-serv2222/test/etc/war
Modified Files:
Remote-web.xml
Log Message:
o minor changes
Index: Remote-web.xml
===================================================================
RCS file: /cvsroot/smartcc/smartcc/test/etc/war/Remote-web.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Remote-web.xml 27 May 2002 16:22:23 -0000 1.1.1.1
--- Remote-web.xml 7 Jun 2002 09:36:51 -0000 1.2
***************
*** 10,13 ****
--- 10,17 ----
<display-name>HTTP Connector</display-name>
<servlet-class>org.smartcc.HTTPConnector</servlet-class>
+ <init-param>
+ <param-name>jndi.list.enabled</param-name>
+ <param-value>true</param-value>
+ </init-param>
</servlet>
|
|
From: <he...@us...> - 2002-06-03 16:11:21
|
Update of /cvsroot/smartcc/smartcc/test/src/org/smartcc/test In directory usw-pr-cvs1:/tmp/cvs-serv12240/src/org/smartcc/test Removed Files: JNDI.java Log Message: o not required anymore --- JNDI.java DELETED --- |
|
From: <he...@us...> - 2002-05-29 15:12:13
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc In directory usw-pr-cvs1:/tmp/cvs-serv32607/src/org/smartcc Modified Files: SmartLocalRef.java SmartRef.java Added Files: AbstractInterceptor.java TracingInterceptor.java Log Message: o AbstractInterceptor: baseclass for interceptors o InterceptorConfiguration o added TracingInterceptor --- NEW FILE: AbstractInterceptor.java --- package org.smartcc; import java.beans.*; import java.io.*; import java.lang.reflect.*; import java.util.*; /** * Abstract baseclass for interceptors. * * @author <a href="mailto:he...@in...">Holger Engels</a>. * @version $Revision: 1.1 $ */ public abstract class AbstractInterceptor implements Interceptor { protected Interceptor next; public void setNext(Interceptor next) { this.next = next; } public Interceptor getNext() { return next; } public static void configure(Interceptor interceptor, Map properties) throws IntrospectionException { BeanInfo info = Introspector.getBeanInfo(interceptor.getClass()); PropertyDescriptor[] descriptors = info.getPropertyDescriptors(); for (int i=0; i < descriptors.length; i++) { Object value = properties.get(descriptors[i].getName()); if (value != null) { Method setter = descriptors[i].getWriteMethod(); if (setter == null) continue; String type = descriptors[i].getPropertyType().getName(); if (type.equals("java.lang.Integer") || type.equals("int")) value = new Integer((String)value); else if (type.equals("java.lang.Long") || type.equals("long")) value = new Long((String)value); else if (type.equals("java.lang.Double") || type.equals("double")) value = new Double((String)value); else if (type.equals("java.lang.Float") || type.equals("float")) value = new Float((String)value); else if (type.equals("java.lang.Byte") || type.equals("byte")) value = new Byte((String)value); else if (type.equals("java.lang.Short") || type.equals("short")) value = new Short((String)value); else if (type.equals("java.lang.Boolean") || type.equals("boolean")) value = new Boolean((String)value); try { setter.invoke(interceptor, new Object[] { value }); } catch (Exception e) { System.err.println(e.getMessage()); e.printStackTrace(System.err); } } } } } --- NEW FILE: TracingInterceptor.java --- package org.smartcc; import java.io.*; import java.lang.reflect.*; import java.util.*; /** * Tracing method invocations. * * @author <a href="mailto:he...@in...">Holger Engels</a>. * @version $Revision: 1.1 $ */ public class TracingInterceptor extends AbstractInterceptor { boolean writeArgumentSize = true; public void setWriteArgumentSize(boolean writeArgumentSize) { this.writeArgumentSize = writeArgumentSize; } public Object invoke(Invocation invocation) throws Throwable { Object[] args = invocation.getArguments(); StringBuffer buffer = new StringBuffer(); buffer.append("TRACE: "); buffer.append(invocation.getMethod().getDeclaringClass().getName()); buffer.append("."); buffer.append(invocation.getMethod().getName()); int length = buffer.length(); buffer.append("("); if (args != null) { for (int i = 0; i < args.length; i++) { buffer.append(i==0 ? "" : ", "); buffer.append(args[i]); } } buffer.append(")"); if (args != null && args.length > 0) { buffer.append("["); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(args); oos.flush(); buffer.append(baos.size()); buffer.append("B]"); } System.out.println(buffer.toString()); buffer.setLength(length); long millis = System.currentTimeMillis(); try { Object ret = getNext().invoke(invocation); millis = System.currentTimeMillis() - millis; buffer.append(": ["); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(ret); oos.flush(); buffer.append(baos.size()); oos = null; baos = null; buffer.append("B]"); buffer.append(" OK after " + millis + "ms"); return ret; } catch (Throwable e) { millis = System.currentTimeMillis() - millis; buffer.append(": FAILED after " + millis + "ms\n"); buffer.append(e.getClass().getName() + ": " + e.getMessage()); throw e; } finally { System.out.println(buffer.toString()); } } } Index: SmartLocalRef.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/SmartLocalRef.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SmartLocalRef.java 29 May 2002 08:12:12 -0000 1.2 --- SmartLocalRef.java 29 May 2002 15:12:07 -0000 1.3 *************** *** 58,63 **** while (it.hasPrevious()) { InterceptorMetaData interceptorMetaData = (InterceptorMetaData)it.previous(); ! Class clazz = getClass().getClassLoader().loadClass(interceptorMetaData.getName()); ! current = (Interceptor)clazz.newInstance(); current.setNext(interceptor); interceptor = current; --- 58,62 ---- while (it.hasPrevious()) { InterceptorMetaData interceptorMetaData = (InterceptorMetaData)it.previous(); ! current = configureInterceptor(interceptorMetaData); current.setNext(interceptor); interceptor = current; *************** *** 68,71 **** --- 67,79 ---- e.printStackTrace(System.err); } + } + + protected Interceptor configureInterceptor(InterceptorMetaData metaData) + throws Exception + { + Class clazz = getClass().forName(metaData.getName()); + Interceptor interceptor = (Interceptor)clazz.newInstance(); + AbstractInterceptor.configure(interceptor, metaData.getProperties()); + return interceptor; } Index: SmartRef.java =================================================================== RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/SmartRef.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SmartRef.java 29 May 2002 08:12:12 -0000 1.2 --- SmartRef.java 29 May 2002 15:12:07 -0000 1.3 *************** *** 1,5 **** package org.smartcc; - import java.beans.*; import java.lang.reflect.*; import java.net.*; --- 1,4 ---- *************** *** 62,67 **** while (it.hasPrevious()) { InterceptorMetaData interceptorMetaData = (InterceptorMetaData)it.previous(); ! Class clazz = getClass().getClassLoader().loadClass(interceptorMetaData.getName()); ! current = (Interceptor)clazz.newInstance(); current.setNext(interceptor); interceptor = current; --- 61,65 ---- while (it.hasPrevious()) { InterceptorMetaData interceptorMetaData = (InterceptorMetaData)it.previous(); ! current = configureInterceptor(interceptorMetaData); current.setNext(interceptor); interceptor = current; *************** *** 72,75 **** --- 70,82 ---- e.printStackTrace(System.err); } + } + + protected Interceptor configureInterceptor(InterceptorMetaData metaData) + throws Exception + { + Class clazz = getClass().forName(metaData.getName()); + Interceptor interceptor = (Interceptor)clazz.newInstance(); + AbstractInterceptor.configure(interceptor, metaData.getProperties()); + return interceptor; } |
|
From: <he...@us...> - 2002-05-29 15:12:13
|
Update of /cvsroot/smartcc/smartcc/doc In directory usw-pr-cvs1:/tmp/cvs-serv32607/doc Modified Files: TODO Log Message: o AbstractInterceptor: baseclass for interceptors o InterceptorConfiguration o added TracingInterceptor Index: TODO =================================================================== RCS file: /cvsroot/smartcc/smartcc/doc/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO 29 May 2002 08:12:12 -0000 1.2 --- TODO 29 May 2002 15:12:07 -0000 1.3 *************** *** 1,4 **** ! MAPIS: ! o write some interceptors FUTURE: --- 1,3 ---- ! o write some generally useful interceptors FUTURE: |
|
From: <he...@us...> - 2002-05-29 15:12:13
|
Update of /cvsroot/smartcc/smartcc In directory usw-pr-cvs1:/tmp/cvs-serv32607 Modified Files: Environment Log Message: o AbstractInterceptor: baseclass for interceptors o InterceptorConfiguration o added TracingInterceptor Index: Environment =================================================================== RCS file: /cvsroot/smartcc/smartcc/Environment,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Environment 28 May 2002 08:09:25 -0000 1.2 --- Environment 29 May 2002 15:12:07 -0000 1.3 *************** *** 10,12 **** --- 10,19 ---- JAVA=$JAVA_HOME/bin/java + anonymous=`grep -c anonymous CVS/Root` + + if [ "$anonymous" == "0" ] + then + export CVS_RSH=ssh + fi + export JAVA JAVA_HOME ANT_HOME PATH |
|
From: <he...@us...> - 2002-05-29 15:12:13
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc/replay
In directory usw-pr-cvs1:/tmp/cvs-serv32607/src/org/smartcc/replay
Modified Files:
RecordingInterceptor.java
Log Message:
o AbstractInterceptor: baseclass for interceptors
o InterceptorConfiguration
o added TracingInterceptor
Index: RecordingInterceptor.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/RecordingInterceptor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RecordingInterceptor.java 29 May 2002 08:12:12 -0000 1.2
--- RecordingInterceptor.java 29 May 2002 15:12:08 -0000 1.3
***************
*** 4,13 ****
public class RecordingInterceptor
! implements Interceptor
{
- Interceptor next;
- public void setNext(Interceptor next) { this.next = next; }
- public Interceptor getNext() { return next; }
-
public Object invoke(Invocation invocation)
throws Throwable
--- 4,9 ----
public class RecordingInterceptor
! extends AbstractInterceptor
{
public Object invoke(Invocation invocation)
throws Throwable
|
|
From: <he...@us...> - 2002-05-29 15:12:13
|
Update of /cvsroot/smartcc/smartcc/test/src/org/smartcc
In directory usw-pr-cvs1:/tmp/cvs-serv32607/test/src/org/smartcc
Modified Files:
TestSmartLocalRef.java TestSmartRef.java
Log Message:
o AbstractInterceptor: baseclass for interceptors
o InterceptorConfiguration
o added TracingInterceptor
Index: TestSmartLocalRef.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/test/src/org/smartcc/TestSmartLocalRef.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestSmartLocalRef.java 29 May 2002 08:12:13 -0000 1.2
--- TestSmartLocalRef.java 29 May 2002 15:12:08 -0000 1.3
***************
*** 36,39 ****
--- 36,45 ----
loader = new URLClassLoader(new URL[] { new URL("file:" + jarName) }, getClass().getClassLoader());
+
+ MainDeployer.getInstance().registerDeployer(new EJBDeployer());
+ MainDeployer.getInstance().registerDeployer(new ApplicationClientDeployer());
+
+ if (!MainDeployer.getInstance().isDeployed(new URL("file:" + jarName)))
+ MainDeployer.getInstance().deploy(new URL("file:" + jarName));
}
***************
*** 54,58 ****
{
EJBLocalRefMetaData localRefMetaData = createMetaData();
! SmartLocalRef smartLocalRef = new SmartLocalRef(loader);
smartLocalRef.setMetaData(localRefMetaData);
--- 60,64 ----
{
EJBLocalRefMetaData localRefMetaData = createMetaData();
! SmartLocalRef smartLocalRef = new SmartLocalRef(getClass().getClassLoader());
smartLocalRef.setMetaData(localRefMetaData);
***************
*** 65,81 ****
}
! /*
public void testLocal()
throws Exception
{
EJBLocalRefMetaData localRefMetaData = createMetaData();
! localRefMetaData.setLookup("ejb/LocalTest");
! SmartLocalRef smartLocalRef = new SmartLocalRef(loader);
smartLocalRef.setMetaData(localRefMetaData);
LocalTestLocalHome home = (LocalTestLocalHome)smartLocalRef.getHome();
LocalTestLocal local = home.create();
! local.echo("testRMI");
}
- */
}
--- 71,97 ----
}
! public void testInterceptorConfiguration()
! throws Exception
! {
! InterceptorMetaData interceptorMetaData = new InterceptorMetaData();
! interceptorMetaData.setName("org.smartcc.TracingInterceptor");
! interceptorMetaData.getProperties().put("writeArgumentSize", "false");
! SmartLocalRef smartLocalRef = new SmartLocalRef(getClass().getClassLoader());
! TracingInterceptor interceptor
! = (TracingInterceptor)smartLocalRef.configureInterceptor(interceptorMetaData);
! Assert.assertTrue(!interceptor.writeArgumentSize);
! }
!
public void testLocal()
throws Exception
{
EJBLocalRefMetaData localRefMetaData = createMetaData();
! localRefMetaData.setLookup("local/LocalTest");
! SmartLocalRef smartLocalRef = new SmartLocalRef(getClass().getClassLoader());
smartLocalRef.setMetaData(localRefMetaData);
LocalTestLocalHome home = (LocalTestLocalHome)smartLocalRef.getHome();
LocalTestLocal local = home.create();
! local.echo("testLocal");
}
}
Index: TestSmartRef.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/test/src/org/smartcc/TestSmartRef.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestSmartRef.java 29 May 2002 08:12:13 -0000 1.2
--- TestSmartRef.java 29 May 2002 15:12:08 -0000 1.3
***************
*** 46,49 ****
--- 46,61 ----
}
+ public void testInterceptorConfiguration()
+ throws Exception
+ {
+ InterceptorMetaData interceptorMetaData = new InterceptorMetaData();
+ interceptorMetaData.setName("org.smartcc.TracingInterceptor");
+ interceptorMetaData.getProperties().put("writeArgumentSize", "false");
+ SmartRef smartRef = new SmartRef(getClass().getClassLoader());
+ TracingInterceptor interceptor
+ = (TracingInterceptor)smartRef.configureInterceptor(interceptorMetaData);
+ Assert.assertTrue(!interceptor.writeArgumentSize);
+ }
+
public void testRMI()
throws Exception
|
|
From: <he...@us...> - 2002-05-29 09:52:32
|
Update of /cvsroot/smartcc/smartcc/etc In directory usw-pr-cvs1:/tmp/cvs-serv29428/etc Added Files: ClientContainer-manifest.mf Log Message: o manifest classpath for ClientContainer.jar --- NEW FILE: ClientContainer-manifest.mf --- Manifest-Version: 1.0 Created-By: he...@in... Main-Class: org.smartcc.ClientContainer Classpath: ejb.jar crimson.jar jaxp.jar |
|
From: <he...@us...> - 2002-05-29 09:52:32
|
Update of /cvsroot/smartcc/smartcc/doc In directory usw-pr-cvs1:/tmp/cvs-serv29428/doc Modified Files: Replay.html Log Message: o manifest classpath for ClientContainer.jar Index: Replay.html =================================================================== RCS file: /cvsroot/smartcc/smartcc/doc/Replay.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Replay.html 29 May 2002 09:31:14 -0000 1.1 --- Replay.html 29 May 2002 09:52:28 -0000 1.2 *************** *** 68,74 **** Both together contain the complete information of all remote calls, that were recorded. For replaying, the Script uses the recorded parameters. The Script has ! to be compiled, of course. </p> <h2>Replaying</h2> <p> --- 68,79 ---- Both together contain the complete information of all remote calls, that were recorded. For replaying, the Script uses the recorded parameters. The Script has ! to be compiled, of course: </p> + <pre> + export CLASSPATH=lib/ejb.jar:dist/client/ClientContainer.jar:test/build/local/TestApplicationClient.jar + javac Replay.java + </pre> + <h2>Replaying</h2> <p> *************** *** 106,109 **** --- 111,115 ---- <pre> + export CLASSPATH=test/build/local/TestApplicationClient.jar:. bin/replay file:`pwd`/test/build/local/TestApplicationClient.jar Replay Replay.data 300 </pre> |
|
From: <he...@us...> - 2002-05-29 09:52:32
|
Update of /cvsroot/smartcc/smartcc
In directory usw-pr-cvs1:/tmp/cvs-serv29428
Modified Files:
build.xml
Log Message:
o manifest classpath for ClientContainer.jar
Index: build.xml
===================================================================
RCS file: /cvsroot/smartcc/smartcc/build.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** build.xml 29 May 2002 08:12:12 -0000 1.4
--- build.xml 29 May 2002 09:52:27 -0000 1.5
***************
*** 78,82 ****
<!-- ==================== Client ==================== -->
<target name="client" depends="compile">
! <jar file="${dist.client}/ClientContainer.jar">
<fileset dir="${build.class}">
<exclude name="org/smartcc/test/**"/>
--- 78,83 ----
<!-- ==================== Client ==================== -->
<target name="client" depends="compile">
! <jar file="${dist.client}/ClientContainer.jar"
! manifest="etc/ClientContainer-manifest.mf">
<fileset dir="${build.class}">
<exclude name="org/smartcc/test/**"/>
|
|
From: <he...@us...> - 2002-05-29 09:50:45
|
Update of /cvsroot/smartcc/smartcc/doc
In directory usw-pr-cvs1:/tmp/cvs-serv22432/doc
Modified Files:
Architecture.html Configuration.html Home.html styles.css
Added Files:
Replay.html
Log Message:
o enhanced layout of documentation
o documentation for replay tool
--- NEW FILE: Replay.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Smart Client Container - Replay Tool</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<h1>Replay Tool</h1>
<p>
Author: <a href="mailto:he...@in...">Holger Engels</a>
</p>
<h2>Overview</h2>
<p>
From the operations point of view, an application divides into a server, a client
and something that connects these two. While a single client normally deals with
a single user, the server serves all active clients in parallel. The load and the
resources of all clients accumulate in some way. A system "scales", if load and
resources rise lineary with the number of parallel clients. Also with the number
of clients, the probability of conflicts and deadlocks rise. The performance of
a system on load cannot be predicted. It has to be measured. The Replay Tool of
the SmartCC allows you to record a representative client session and replay it
with an arbitrary number of simulated clients in parallel.
</p>
<h2>Recording</h2>
<p>
The org.smartcc.replay.RecordingInterceptor has to be configured for all ejb-refs
that shall be included in the recording. The smart-ref definition may look like
the this:
</p>
<table><tr>
<td style="border: black thin solid"><pre>
<smart-ref>
<ejb-ref-name>ejb/RemoteTest</ejb-ref-name>
<transport>org.smartcc.RMITransport</transport>
<lookup>ejb/RemoteTest</lookup>
<properties>
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
</properties>
<interceptor>
<interceptor-name>org.smartcc.replay.RecordingInterceptor</interceptor-name>
</interceptor>
</smart-ref>
</pre></td>
</tr></table>
<p>
It doesn't matter, what transport and other interceptors are configured. Now a
representative usecase can be recorded. The result are two files:
</p>
<dl>
<dt>Replay.java</dt>
<dd>A java source file (called <i>Script</i>) that contains the essential code
for the simulated client. The code is quite readable and can be
customized.</dd>
<dt>Replay.data</dt>
<dd>A file with the serialized parameters and results that were passed to
/ returned from the invocations.</dd>
</dl>
<p>
Both together contain the complete information of all remote calls, that were
recorded. For replaying, the Script uses the recorded parameters. The Script has
to be compiled, of course.
</p>
<h2>Replaying</h2>
<p>
The shell script <i>replay</i> in the bin directory can be used to start the
simulator. The application client jar must be contained in the classpath. The
script takes the following command line arguments:
</p>
<table><tr>
<td style="border: black thin solid"><pre>
usage: simulator [options] client_jar script_class data_file user_range
arguments:
client_jar url of application client jar with deployment descriptors
script_class full qualified classname
data_file serialized arguments
user_range 1-'lastUser' or 'firstUser'-'lastUser'
options:
-d, --delay [0..t] factor, that is applied to the recorded delays
0.0 for no delays, 1.0 for same tempo as during recording (default)
-a, --auth the auth type, one of HTTP, JBoss (more to follow), defaults to HTTP
-u, --userid the base userid, to which firstUser .. lastUser will be appended, defaults to 'demo'
-p, --password the password for all users
-i, --iterations number of iterations a virtual user runs the script, defaults to 'start'
-r, --ramp load ramp, n'th client is started after n times the delay in ms, default is 0
-o, --output redirect output to a file
</pre></td>
</tr></table>
<p>
Bear in mind, that the RecordingIntercptor should not be configured for
replaying. Example for starting the replay tool:
</p>
<pre>
bin/replay file:`pwd`/test/build/local/TestApplicationClient.jar Replay Replay.data 300
</pre>
</body>
</html>
Index: Architecture.html
===================================================================
RCS file: /cvsroot/smartcc/smartcc/doc/Architecture.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Architecture.html 27 May 2002 16:21:55 -0000 1.1.1.1
--- Architecture.html 29 May 2002 09:31:14 -0000 1.2
***************
*** 9,12 ****
--- 9,16 ----
<h1>Architecture of the Smart Client Container</h1>
+ <p>
+ Author: <a href="mailto:he...@in...">Holger Engels</a>
+ </p>
+
<h2>Overview</h2>
<p>
Index: Configuration.html
===================================================================
RCS file: /cvsroot/smartcc/smartcc/doc/Configuration.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Configuration.html 27 May 2002 16:21:55 -0000 1.1.1.1
--- Configuration.html 29 May 2002 09:31:14 -0000 1.2
***************
*** 9,12 ****
--- 9,16 ----
<h1>Configuration of the Smart Client Container</h1>
+ <p>
+ Author: <a href="mailto:he...@in...">Holger Engels</a>
+ </p>
+
<h2>Overview</h2>
<p>
***************
*** 52,56 ****
<table><tr>
<td style="border: black thin solid"><pre>
-
<application-client>
<ejb-ref>
--- 56,59 ----
***************
*** 61,68 ****
</ejb-ref>
</application-client>
-
</pre></td>
<td style="border: black thin solid"><pre>
-
<smart-client>
<smart-ref>
--- 64,69 ----
***************
*** 76,80 ****
</smart-ref>
</smart-client>
-
</pre></td>
</tr></table>
--- 77,80 ----
***************
*** 87,91 ****
<table><tr>
<td style="border: black thin solid"><pre>
-
<ejb-jar>
<enterprise-beans>
--- 87,90 ----
***************
*** 106,113 ****
</enterprise-beans>
</ejb-jar>
-
</pre></td>
<td style="border: black thin solid"><pre>
-
<smart-ejb-jar>
<enterprise-beans>
--- 105,110 ----
***************
*** 125,129 ****
</enterprise-beans>
</smart-ejb-jar>
-
</pre></td>
</tr></table>
--- 122,125 ----
***************
*** 152,156 ****
<table><tr>
<td style="border: black thin solid"><pre>
-
<application-client>
<ejb-local-ref>
--- 148,151 ----
***************
*** 161,168 ****
</ejb-local-ref>
</application-client>
-
</pre></td>
<td style="border: black thin solid"><pre>
-
<smart-client>
<smart-local-ref>
--- 156,161 ----
***************
*** 171,175 ****
</smart-local-ref>
</smart-client>
-
</pre></td>
</tr></table>
--- 164,167 ----
***************
*** 182,186 ****
<table><tr>
<td style="border: black thin solid"><pre>
-
<ejb-jar>
<enterprise-beans>
--- 174,177 ----
***************
*** 201,208 ****
</enterprise-beans>
</ejb-jar>
-
</pre></td>
<td style="border: black thin solid"><pre>
-
<smart-ejb-jar>
<enterprise-beans>
--- 192,197 ----
***************
*** 216,220 ****
</enterprise-beans>
</smart-ejb-jar>
-
</pre></td>
</tr></table>
--- 205,208 ----
***************
*** 246,251 ****
<pre>
! java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
! java.naming.provider.url=iiop://localhost:900
</pre>
--- 234,239 ----
<pre>
! java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
! java.naming.provider.url=iiop://localhost:900
</pre>
***************
*** 260,264 ****
<pre>
! org.smartcc.connector.url=http://localhost:8080/HTTPConnector/
</pre>
--- 248,252 ----
<pre>
! org.smartcc.connector.url=http://localhost:8080/HTTPConnector/
</pre>
Index: Home.html
===================================================================
RCS file: /cvsroot/smartcc/smartcc/doc/Home.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Home.html 28 May 2002 08:09:26 -0000 1.1
--- Home.html 29 May 2002 09:31:14 -0000 1.2
***************
*** 27,32 ****
<li><a href="Architecture.html">Architecture</a></li>
<li><a href="Configuration.html">Configuration</a></li>
<li><a href="api/index.html">API Documentation</a></li>
- <li><a href="http://sourceforge.net/projects/smartcc">SourceForge project page</a></li>
</ul>
--- 27,32 ----
<li><a href="Architecture.html">Architecture</a></li>
<li><a href="Configuration.html">Configuration</a></li>
+ <li><a href="Replay.html">Replay Tool</a></li>
<li><a href="api/index.html">API Documentation</a></li>
</ul>
***************
*** 35,41 ****
<h2>Download / Access</h2>
<ul>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=54434">Releases</a></li>
! <li><a href="http://sourceforge.net/cvs/?group_id=54434">CVS</a></li>
! <li><a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/smartcc">Browse CVS</a></li>
<li><a href="http://sourceforge.net/mail/?group_id=54434">Mailing Lists</a></li>
</ul>
--- 35,42 ----
<h2>Download / Access</h2>
<ul>
+ <li><a href="http://sourceforge.net/projects/smartcc">SourceForge project page</a></li>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=54434">Releases</a></li>
! <li><a href="http://sourceforge.net/cvs/?group_id=54434">CVS</a> /
! <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/smartcc">Browse CVS</a></li>
<li><a href="http://sourceforge.net/mail/?group_id=54434">Mailing Lists</a></li>
</ul>
Index: styles.css
===================================================================
RCS file: /cvsroot/smartcc/smartcc/doc/styles.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** styles.css 28 May 2002 08:09:26 -0000 1.1
--- styles.css 29 May 2002 09:31:14 -0000 1.2
***************
*** 83,161 ****
}
! .wings {
! font-family: sans-serif;
! font-size: 12pt;
! font-weight: bold;
! font-style: normal;
! color: #770000
! }
!
! .is {
font-family: sans-serif;
font-size: 12pt;
font-weight: normal;
font-style: normal;
! color: #000077
! }
!
! .bigwings {
! font-family: sans-serif;
! font-size: 18pt;
! font-weight: bold;
! font-style: normal;
! color: #770000
! }
!
! .bigwingsheader {
! vertical-align: middle;
! font-family: sans-serif;
! font-size: 18pt;
! font-weight: bold;
! font-style: normal;
! color: #ffffff
! }
!
! .bigis {
! font-family: sans-serif;
! font-size: 16pt;
! font-weight: normal;
! font-style: normal;
! color: #000077
! }
!
! .bigisheader {
! font-family: sans-serif;
! font-size: 16pt;
! font-weight: normal;
! font-style: normal;
! color: #ffffff
}
! .menu {
! background: #222299;
! padding: 0;
! margin: 0;
! font-family: sans-serif;
! font-size: 12pt;
font-weight: bold;
- font-style: normal;
- border-width: 0;
- color: #ffffff
}
! A:link.menu {
! color: #ffffff;
! text-decoration: none;
! font-weight: bold
! }
!
! A:visited.menu {
! color: #ffffff;
! text-decoration: none
! }
!
! A:active.menu {
! color: #66ffff;
! text-decoration: none
}
--- 83,100 ----
}
! DL {
font-family: sans-serif;
font-size: 12pt;
font-weight: normal;
font-style: normal;
! color: #000077;
}
! DT {
font-weight: bold;
}
! PRE {
! padding: 10pt;
}
|
|
From: <he...@us...> - 2002-05-29 08:12:17
|
Update of /cvsroot/smartcc/smartcc/doc In directory usw-pr-cvs1:/tmp/cvs-serv23271/doc Modified Files: TODO Log Message: o fixed some bugs regarding interceptors o implemented the recorder and replay tool Index: TODO =================================================================== RCS file: /cvsroot/smartcc/smartcc/doc/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 27 May 2002 16:21:55 -0000 1.1.1.1 --- TODO 29 May 2002 08:12:12 -0000 1.2 *************** *** 1,5 **** MAPIS: o write some interceptors - o invocation recording FUTURE: --- 1,4 ---- |
|
From: <he...@us...> - 2002-05-29 08:12:17
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc/metadata
In directory usw-pr-cvs1:/tmp/cvs-serv23271/src/org/smartcc/metadata
Modified Files:
InterceptorMetaData.java
Log Message:
o fixed some bugs regarding interceptors
o implemented the recorder and replay tool
Index: InterceptorMetaData.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/metadata/InterceptorMetaData.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** InterceptorMetaData.java 27 May 2002 16:22:02 -0000 1.1.1.1
--- InterceptorMetaData.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 12,20 ****
extends MetaData
{
! protected String interceptorName;
! protected HashMap properties = new HashMap();
! public String getInterceptorName() { return interceptorName; }
public Map getProperties() { return properties; }
--- 12,26 ----
extends MetaData
{
! protected String name;
! protected Map properties = new HashMap();
! public void setName(String name) {
! this.name = name;
! }
! public String getName() { return name; }
+ public void setProperties(Map properties) {
+ this.properties = properties;
+ }
public Map getProperties() { return properties; }
***************
*** 26,30 ****
throws DeploymentException
{
! interceptorName = getElementContent(getUniqueChild(element, "interceptor-name"));
Iterator iterator = getChildrenByTagName(element, "property");
--- 32,36 ----
throws DeploymentException
{
! name = getElementContent(getUniqueChild(element, "interceptor-name"));
Iterator iterator = getChildrenByTagName(element, "property");
|
|
From: <he...@us...> - 2002-05-29 08:12:17
|
Update of /cvsroot/smartcc/smartcc/test/src/org/smartcc/test
In directory usw-pr-cvs1:/tmp/cvs-serv23271/test/src/org/smartcc/test
Modified Files:
Main.java RemoteTestBean.java
Log Message:
o fixed some bugs regarding interceptors
o implemented the recorder and replay tool
Index: Main.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/test/src/org/smartcc/test/Main.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Main.java 27 May 2002 16:22:03 -0000 1.1.1.1
--- Main.java 29 May 2002 08:12:13 -0000 1.2
***************
*** 21,26 ****
System.out.println(".. done");
! System.out.println("loading a class from a dependent jar ..");
! Class.forName("org.wings.session.Session");
System.out.println(".. done");
}
--- 21,53 ----
System.out.println(".. done");
! try {
! System.out.println("loading a class from a dependent jar ..");
! Class.forName("org.wings.session.Session");
! System.out.println(".. done");
! }
! catch (ClassNotFoundException e) {
! System.err.println("wings.jar is not present");
! }
!
! System.out.println("recording some calls ..");
! home = (RemoteTestHome)context.lookup("ejb/ReplayTest");
! remote = home.create("A");
! RemoteTest remote2 = home.create("B");
! remote.echo(">>replay<<");
! remote2.echo(">>replay<<");
! remote.helper();
! try {
! remote.throwBusiness(new NamingException("replay test"));
! }
! catch (NamingException e) { /* ignore */ }
! catch (Exception e) {
! System.err.println("should have been NamingException");
! System.err.println(e.getMessage());
! e.printStackTrace(System.err);
! }
!
! System.out.println("calling remove ..");
! remote2.remove();
! remote.remove();
System.out.println(".. done");
}
Index: RemoteTestBean.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/test/src/org/smartcc/test/RemoteTestBean.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** RemoteTestBean.java 27 May 2002 16:22:03 -0000 1.1.1.1
--- RemoteTestBean.java 29 May 2002 08:12:13 -0000 1.2
***************
*** 8,12 ****
* Remote Session Bean
*
! * @ejb:bean type="Stateless" name="RemoteTest" view-type="remote" jndi-name="ejb/RemoteTest"
* @ejb:home package="org.smartcc.test"
* @ejb:interface remote-package="org.smartcc.test"
--- 8,12 ----
* Remote Session Bean
*
! * @ejb:bean type="Stateful" name="RemoteTest" view-type="remote" jndi-name="ejb/RemoteTest"
* @ejb:home package="org.smartcc.test"
* @ejb:interface remote-package="org.smartcc.test"
***************
*** 17,20 ****
--- 17,21 ----
private static int idgen = 0;
private int id = -1;
+ private String name = getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1);;
private SessionContext sctx;
***************
*** 28,32 ****
*/
public void echo(String message) {
! System.out.println(id + " message: " + message);
}
--- 29,33 ----
*/
public void echo(String message) {
! log(message);
}
***************
*** 65,69 ****
public void ejbActivate() throws EJBException, RemoteException {}
public void ejbPassivate() throws EJBException, RemoteException {}
! public void ejbRemove() throws EJBException, RemoteException {}
/**
--- 66,73 ----
public void ejbActivate() throws EJBException, RemoteException {}
public void ejbPassivate() throws EJBException, RemoteException {}
! public void ejbRemove() throws EJBException, RemoteException
! {
! log("remove");
! }
/**
***************
*** 77,83 ****
}
private void log(String message) {
- String name = getClass().getName();
- name = name.substring(name.lastIndexOf(".") + 1);
System.out.println("[" + name + " " + id + "] " + message);
}
--- 81,96 ----
}
+ /**
+ * @ejb:create-method
+ */
+ public void ejbCreate(String name)
+ throws CreateException
+ {
+ this.name = name;
+ id = ++idgen;
+ log("create");
+ }
+
private void log(String message) {
System.out.println("[" + name + " " + id + "] " + message);
}
|
|
From: <he...@us...> - 2002-05-29 08:12:17
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc/replay
In directory usw-pr-cvs1:/tmp/cvs-serv23271/src/org/smartcc/replay
Modified Files:
Coder.java Recorder.java RecordingInterceptor.java
Added Files:
Client.java HTTPClient.java JBossClient.java
MultiplexedAuthenticator.java Script.java Simulator.java
Log Message:
o fixed some bugs regarding interceptors
o implemented the recorder and replay tool
--- NEW FILE: Client.java ---
package org.smartcc.replay;
import javax.naming.*;
import org.smartcc.*;
public class Client
extends Thread
{
private Script script;
protected String userid;
protected String passwd;
private float delay = 1.0f;
private int initialDelay = 0;
private int iterations = 1;
private int currentIteration = 0;
public void init(Script script, String userid, String passwd) {
this.script = script;
this.userid = userid;
this.passwd = passwd;
if (userid == null || passwd == null)
throw new IllegalArgumentException("userid/passwd required");
if (script == null)
throw new IllegalArgumentException("script required");
script.setClient(this);
try {
loadConfiguration();
}
catch (Exception e) {
System.err.println(e.getMessage());
e.printStackTrace(System.err);
}
}
public void setDelay(float delay) {
this.delay = delay;
}
public void setInitialDelay(int initialDelay) {
this.initialDelay = initialDelay;
}
public void setIterations(int iterations) {
this.iterations = iterations;
}
public String getUserid() { return userid; }
public int getCurrentIteration() { return currentIteration; }
public void delay(long time) {
if (delay > 0.0) {
try {
sleep((long)(time * delay));
}
catch (InterruptedException e) { /* pech */ }
}
}
public void run() {
try {
if (initialDelay > 0)
sleep(initialDelay);
}
catch (InterruptedException e) { /* pech */ }
login();
for (currentIteration = 1; currentIteration <= iterations; currentIteration++) {
try {
long millis = System.currentTimeMillis();
System.out.println("CLIENT: " + getUserid() + " begin (" + currentIteration + ")");
script.execute();
System.out.println("CLIENT: " + getUserid() + " end (" + currentIteration + ") after " +
(System.currentTimeMillis() - millis) + "ms");
}
catch (Exception e) {
System.out.println("CLIENT: " + getUserid() + " in iteration " + currentIteration + " threw exception: " +
e.getClass().getName() + ": " + e.getMessage());
System.err.println(e.getMessage());
e.printStackTrace(System.err);
}
}
}
protected void loadConfiguration()
throws Exception
{
// ejb-refs lesen
}
protected void login() {}
private static boolean loaded = false;
protected static Context clientContext = null;
protected static Context getClientContext()
throws NamingException
{
if (clientContext == null) {
clientContext = (Context)new InitialContext();
}
return clientContext;
}
}
--- NEW FILE: HTTPClient.java ---
package org.smartcc.replay;
import java.net.*;
public class HTTPClient
extends Client
{
public HTTPClient() {
installAuthenticator();
}
protected void login() {
MultiplexedAuthenticator.setPrincipal(userid);
MultiplexedAuthenticator.setCredential(passwd);
}
private static Authenticator authenticator = null;
private static void installAuthenticator() {
if (authenticator == null) {
synchronized (HTTPClient.class) {
if (authenticator == null) {
authenticator = new MultiplexedAuthenticator();
Authenticator.setDefault(authenticator);
}
}
}
}
}
--- NEW FILE: JBossClient.java ---
package org.smartcc.replay;
import org.jboss.security.*;
public class JBossClient
extends Client
{
static {
SecurityAssociation.setServer();
}
protected void login() {
SecurityAssociation.setPrincipal(new SimplePrincipal(userid));
SecurityAssociation.setCredential(passwd);
}
}
--- NEW FILE: MultiplexedAuthenticator.java ---
package org.smartcc.replay;
import java.net.*;
public class MultiplexedAuthenticator
extends Authenticator
{
static ThreadLocal threadPrincipal = new ThreadLocal();
static ThreadLocal threadCredential = new ThreadLocal();
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication((String)threadPrincipal.get(),
(char[])threadCredential.get());
}
public static void setPrincipal(String principal) {
threadPrincipal.set(principal);
}
public static void setCredential(String credential) {
threadCredential.set(credential.toCharArray());
}
}
--- NEW FILE: Script.java ---
package org.smartcc.replay;
import java.util.*;
public abstract class Script
{
protected Client client;
protected List data;
public void setClient(Client client) {
this.client = client;
}
public Client getClient() { return client; }
public void setData(List data) {
this.data = data;
}
protected Object getObject(int invocation, int index) {
return ((Recorder.Data)data.get(invocation)).parameters[index];
}
protected boolean getBoolean(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Boolean)args[index]).booleanValue();
}
protected char getChar(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Character)args[index]).charValue();
}
protected byte getByte(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Byte)args[index]).byteValue();
}
protected short getShort(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Short)args[index]).shortValue();
}
protected int getInt(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Integer)args[index]).intValue();
}
protected long getLong(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Long)args[index]).longValue();
}
protected float getFloat(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Float)args[index]).floatValue();
}
protected double getDouble(int invocation, int index) {
Object[] args = ((Recorder.Data)data.get(invocation)).parameters;
return ((Double)args[index]).doubleValue();
}
public abstract void execute() throws Exception;
}
--- NEW FILE: Simulator.java ---
package org.smartcc.replay;
import java.io.*;
import java.util.*;
import org.smartcc.*;
public class Simulator
{
public static void main(String[] args) {
int index = 0;
boolean fail = false;
float delay = 1.0f;
String auth = "HTTP";
String userid = "demo";
String password = "start";
int iterations = 1;
int ramp = 0;
try {
while (index < args.length) {
if ("-d".equals(args[index]) || "--delay".equals(args[index]))
delay = new Float(args[index+1]).floatValue();
else if ("-a".equals(args[index]) || "--auth".equals(args[index]))
auth = args[index+1];
else if ("-u".equals(args[index]) || "--userid".equals(args[index]))
userid = args[index+1];
else if ("-p".equals(args[index]) || "--password".equals(args[index]))
password = args[index+1];
else if ("-i".equals(args[index]) || "--iterations".equals(args[index]))
iterations = new Integer(args[index+1]).intValue();
else if ("-r".equals(args[index]) || "--ramp".equals(args[index]))
ramp = new Integer(args[index+1]).intValue();
else if ("-o".equals(args[index]) || "--output".equals(args[index]))
System.setOut(new PrintStream(new FileOutputStream(args[index+1])));
else
break;
index+=2;
}
}
catch (Exception e) { fail = true; }
if (fail || args.length < index + 3) {
printUsage();
System.exit(1);
}
String clientJarURL = args[index];
String scriptClassName = args[index+1];
String dataFileName = args[index+2];
int firstUser;
int lastUser;
int pos = args[index+3].indexOf("-");
if (pos > -1) {
String a = args[index+3].substring(0, pos);
String b = args[index+3].substring(pos + 1);
firstUser = Integer.valueOf(a).intValue();
lastUser = Integer.valueOf(b).intValue();
}
else {
firstUser = 1;
lastUser = Integer.valueOf(args[index+3]).intValue();
}
try {
// load application client
ApplicationClientDeployer deployer = new ApplicationClientDeployer();
deployer.deploy(null);
// load script class
Class scriptClass = Class.forName(scriptClassName);
// load client class
String clientClassName = "org.smartcc.replay." + auth + "Client";
Class clientClass = Class.forName(clientClassName);
// load data
File dataFile = new File(dataFileName);
FileInputStream fin = new FileInputStream(dataFile);
ObjectInputStream in = new ObjectInputStream(fin);
List data = (List)in.readObject();
in.close();
System.out.println("INFO: initializing clients for " +
userid + firstUser + " to " + userid + lastUser);
List clients = new LinkedList();
for (int i=firstUser; i <= lastUser; i++) {
Script script = (Script)scriptClass.newInstance();
script.setData(data);
Client client = (Client)clientClass.newInstance();
client.init(script, userid + i, password);
client.setDelay(delay);
client.setInitialDelay((i - firstUser) * ramp);
client.setIterations(iterations);
clients.add(client);
}
System.out.println("INFO: starting clients");
Iterator it = clients.iterator();
while (it.hasNext()) {
Client client = (Client)it.next();
client.start();
}
}
catch (Exception e) {
System.err.println(e.getMessage());
e.printStackTrace(System.err);
}
}
protected static void printUsage() {
System.err.println("usage: simulator [options] client_jar script_class data_file user_range");
System.err.println("arguments:");
System.err.println(" client_jar url of application client jar with deployment descriptors");
System.err.println(" script_class full qualified classname");
System.err.println(" data_file serialized arguments");
System.err.println(" user_range 1-'lastUser' or 'firstUser'-'lastUser'");
System.err.println("options:");
System.err.println(" -d, --delay [0..t] factor, that is applied to the recorded delays");
System.err.println(" 0.0 for no delays, 1.0 for same tempo as during recording (default)");
System.err.println(" -a, --auth the auth type, one of HTTP, JBoss (more to follow), defaults to HTTP");
System.err.println(" -u, --userid the base userid, to which firstUser .. lastUser will be appended, defaults to 'demo'");
System.err.println(" -p, --password the password for all users");
System.err.println(" -i, --iterations number of iterations a virtual user runs the script, defaults to 'start'");
System.err.println(" -r, --ramp load ramp, n'th client is started after n times the delay in ms, default is 0");
System.err.println(" -o, --output redirect output to a file");
}
}
Index: Coder.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Coder.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Coder.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- Coder.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 2,5 ****
--- 2,6 ----
import java.io.*;
+ import java.lang.reflect.*;
import java.util.*;
***************
*** 8,18 ****
public class Coder
{
! PrintWriter out;
String className;
List records;
String indention = "";
public Coder(OutputStream out, String className) {
! this.out = new PrintWriter(out);
this.className = className;
}
--- 9,32 ----
public class Coder
{
! static final Map primitives = new HashMap();
! static {
! primitives.put("Z", "boolean");
! primitives.put("C", "char");
! primitives.put("B", "byte");
! primitives.put("S", "short");
! primitives.put("I", "int");
! primitives.put("J", "long");
! primitives.put("D", "float");
! }
!
! PrintStream out;
String className;
List records;
+ Map map = new HashMap();
String indention = "";
+ boolean indented = false;
public Coder(OutputStream out, String className) {
! this.out = new PrintStream(out);
this.className = className;
}
***************
*** 32,35 ****
--- 46,50 ----
writeln("import javax.naming.*;");
writeln("import org.smartcc.*;");
+ writeln("import org.smartcc.replay.*;");
writeln();
writeln("public class " + className);
***************
*** 45,66 ****
public void writeInvocations() {
writeln("Context context = new InitialContext();");
Iterator it = records.iterator();
while (it.hasNext()) {
! Invocation invocation = (Invocation)it.next();
! SmartRef ref = (SmartRef)invocation.getTarget();
! String homeClassName = ref.getHomeInterfaceClass().getName();
! String remoteClassName = ref.getRemoteInterfaceClass().getName();
! String name = className.substring(className.lastIndexOf("."));
! writeln("// " + invocation.getMethod());
! /*
! writeln(homeClassName + " " + name + "Home" +
! " = (" + homeClassName + ")context.lookup(\"" + ref.getName() + "\");");
! writeln(remotClassName + " " + name +
! " =
! */
}
}
public void writeFooter() {
unindent();
--- 60,150 ----
public void writeInvocations() {
writeln("Context context = new InitialContext();");
+
+ long millis = 0;
+ int r = 0;
Iterator it = records.iterator();
while (it.hasNext()) {
! Recorder.Record record = (Recorder.Record)it.next();
! writeln();
! if (r > 0)
! writeln("client.delay(" + (record.millis - millis) + ");");
! millis = record.millis;
! Method method = record.invocation.getMethod();
! if ("create".equals(method.getName()))
! writeCreate(record, r);
! else if ("remove".equals(method.getName()) && method.getParameterTypes().length == 0)
! writeRemove(record);
! else
! writeRemote(record, r);
! r++;
! }
! }
!
! public void writeCreate(Recorder.Record record, int r) {
! SmartRef ref = (SmartRef)record.invocation.getValue(Invocation.SMARTREF);
! String lookup = ref.getName();
! String homeClassName = ref.getHomeInterfaceClass().getName();
! String remoteClassName = ref.getRemoteInterfaceClass().getName();
! String name = remoteClassName.substring(remoteClassName.lastIndexOf(".") + 1);
! name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
! name = getId(name);
! map.put(record.result, name);
!
! writeln(homeClassName + " " + name + "Home" +
! " = (" + homeClassName + ")context.lookup(\"" + lookup + "\");");
!
! write(remoteClassName + " " + name +
! " = " + name + "Home.create(");
! writeParameterList(record.invocation.getMethod().getParameterTypes(), r);
! writeln(");");
! }
!
! public void writeParameterList(Class[] parameterTypes, int r) {
! for (int p=0; p < parameterTypes.length; p++) {
! if (p > 0)
! write(", ");
! if (parameterTypes[p].isPrimitive())
! writePrimitive(parameterTypes[p], r, p);
! else
! writeObject(parameterTypes[p], r, p);
}
}
+ public void writePrimitive(Class parameterType, int r, int p) {
+ String name = parameterType.getName();
+ write("get" + Character.toUpperCase(name.charAt(0)) + name.substring(1) +
+ "(" + r + ", " + p + ")");
+ }
+
+ public void writeObject(Class parameterType, int r, int p) {
+ String name = parameterType.getName();
+ if (name.startsWith("[")) {
+ int count = name.lastIndexOf("[") + 1;
+ name = name.substring(count);
+
+ if (name.startsWith("L"))
+ name = name.substring(1, name.length() - 1);
+ else
+ name = (String)primitives.get(name);
+
+ for (int i=0; i < count; i++)
+ name += "[]";
+ }
+ write("(" + name + ")getObject(" + r + ", " + p + ")");
+ }
+
+ public void writeRemote(Recorder.Record record, int r) {
+ String name = (String)map.get(record.invocation.getTarget());
+ write(name + "." + record.invocation.getMethod().getName() + "(");
+ writeParameterList(record.invocation.getMethod().getParameterTypes(), r);
+ writeln(");");
+ }
+
+ public void writeRemove(Recorder.Record record) {
+ String name = (String)map.get(record.invocation.getTarget());
+ writeln(name + ".remove();");
+ }
+
public void writeFooter() {
unindent();
***************
*** 71,83 ****
protected void write(String text) {
! out.print(indention + text);
}
protected void writeln(String text) {
! out.println(indention + text);
}
protected void writeln() {
out.println();
}
--- 155,177 ----
protected void write(String text) {
! if (!indented) {
! out.print(indention);
! indented = true;
! }
! out.print(text);
}
protected void writeln(String text) {
! if (!indented) {
! out.print(indention);
! indented = true;
! }
! out.println(text);
! indented = false;
}
protected void writeln() {
out.println();
+ indented = false;
}
***************
*** 88,91 ****
--- 182,199 ----
protected void unindent() {
indention = indention.substring(0, indention.length() - 4);
+ }
+
+ static Map ids = new HashMap();
+ static String getId(String base) {
+ Integer counter = (Integer)ids.get(base);
+ if (counter == null) {
+ counter = new Integer(1);
+ ids.put(base, counter);
+ }
+ else {
+ counter = new Integer(counter.intValue() + 1);
+ ids.put(base, counter);
+ }
+ return base + counter;
}
}
Index: Recorder.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/Recorder.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Recorder.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- Recorder.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 12,16 ****
public static Recorder getInstance() { return instance; }
! String className = System.getProperty("org.smartcc.replay.classname");
List records = Collections.synchronizedList(new LinkedList());
--- 12,16 ----
public static Recorder getInstance() { return instance; }
! String className = System.getProperty("org.smartcc.replay.classname", "Replay");
List records = Collections.synchronizedList(new LinkedList());
***************
*** 24,34 ****
public String getClassName() { return className; }
! public void record(Invocation invocation) {
! if (!(invocation.getTarget() instanceof SmartRef)) {
! System.err.println("do not use the RecordingInterceptor for ejb-local-refs");
return;
}
! records.add(invocation);
}
--- 24,37 ----
public String getClassName() { return className; }
! public void record(Invocation invocation, Object result, Throwable throwable) {
! Object object = invocation.getValue(Invocation.SMARTREF);
!
! if (!(object instanceof SmartRef)) {
! System.err.println("use the RecordingInterceptor only for ejb-refs");
! System.err.println(object + " is of class: " + object.getClass().getName());
return;
}
! records.add(new Record(invocation, result, throwable));
}
***************
*** 36,43 ****
--- 39,66 ----
synchronized (records) {
try {
+ // write script
File file = new File(className + ".java");
OutputStream out = new FileOutputStream(file);
Coder coder = new Coder(out, className);
coder.write(records);
+ out.flush();
+ out.close();
+
+ // write data
+ List datas = new LinkedList();
+ Iterator it = records.iterator();
+ while (it.hasNext()) {
+ Record record = (Record)it.next();
+ Data data = new Data(record.invocation.getArguments(),
+ record.result,
+ record.throwable);
+ datas.add(data);
+ }
+ file = new File(className + ".data");
+ ObjectOutputStream oout = new ObjectOutputStream(new FileOutputStream(file));
+ oout.writeObject(datas);
+ oout.flush();
+ oout.close();
+
records.clear();
}
***************
*** 46,49 ****
--- 69,100 ----
e.printStackTrace(System.err);
}
+ }
+ }
+
+ public static class Record
+ {
+ public Invocation invocation;
+ public Object result;
+ public Throwable throwable;
+ public long millis = System.currentTimeMillis();
+
+ public Record(Invocation invocation, Object result, Throwable throwable) {
+ this.invocation = invocation;
+ this.result = result;
+ this.throwable = throwable;
+ }
+ }
+
+ public static class Data
+ implements Serializable
+ {
+ public Object[] parameters;
+ public Object result;
+ public Throwable throwable;
+
+ public Data(Object[] parameters, Object result, Throwable throwable) {
+ this.parameters = parameters;
+ this.result = result;
+ this.throwable = throwable;
}
}
Index: RecordingInterceptor.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/replay/RecordingInterceptor.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** RecordingInterceptor.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- RecordingInterceptor.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 13,18 ****
throws Throwable
{
! Recorder.getInstance().record(invocation);
! return next.invoke(invocation);
}
}
--- 13,30 ----
throws Throwable
{
! Object result = null;
! Throwable throwable = null;
!
! try {
! result = next.invoke(invocation);
! return result;
! }
! catch (Throwable e) {
! throwable = e;
! throw e;
! }
! finally {
! Recorder.getInstance().record(invocation, result, throwable);
! }
}
}
|
Update of /cvsroot/smartcc/smartcc/src/org/smartcc
In directory usw-pr-cvs1:/tmp/cvs-serv23271/src/org/smartcc
Modified Files:
ClientContainer.java SmartLocalRef.java
SmartLocalRefObject.java SmartRef.java SmartRefObject.java
Log Message:
o fixed some bugs regarding interceptors
o implemented the recorder and replay tool
Index: ClientContainer.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/ClientContainer.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** ClientContainer.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- ClientContainer.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 26,29 ****
--- 26,33 ----
}
+ public void deploy(String deploy) {
+ deploy(new String[] { deploy });
+ }
+
public void deploy(String[] deploy) {
try {
Index: SmartLocalRef.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/SmartLocalRef.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** SmartLocalRef.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- SmartLocalRef.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 50,60 ****
List interceptors = new LinkedList();
interceptors.addAll(ejbLocalRefMetaData.getInterceptors());
! interceptors.add("org.smartcc.LocalTransport");
Interceptor current;
ListIterator it = interceptors.listIterator(interceptors.size());
while (it.hasPrevious()) {
! String name = (String)it.previous();
! Class clazz = getClass().getClassLoader().loadClass(name);
current = (Interceptor)clazz.newInstance();
current.setNext(interceptor);
--- 50,62 ----
List interceptors = new LinkedList();
interceptors.addAll(ejbLocalRefMetaData.getInterceptors());
! InterceptorMetaData transportMetaData = new InterceptorMetaData();
! transportMetaData.setName("org.smartcc.LocalTransport");
! interceptors.add(transportMetaData);
Interceptor current;
ListIterator it = interceptors.listIterator(interceptors.size());
while (it.hasPrevious()) {
! InterceptorMetaData interceptorMetaData = (InterceptorMetaData)it.previous();
! Class clazz = getClass().getClassLoader().loadClass(interceptorMetaData.getName());
current = (Interceptor)clazz.newInstance();
current.setNext(interceptor);
Index: SmartLocalRefObject.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/SmartLocalRefObject.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** SmartLocalRefObject.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- SmartLocalRefObject.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 35,40 ****
methods.put(EJBLocalObject.class.getMethod("getPrimaryKey", null),
Delegate.class.getMethod("getPrimaryKey", null));
- methods.put(EJBLocalObject.class.getMethod("remove", null),
- Delegate.class.getMethod("remove", null));
methods.put(EJBLocalObject.class.getMethod("isIdentical", new Class[] { EJBLocalObject.class }),
Delegate.class.getMethod("isIdentical", new Class[] { EJBLocalObject.class }));
--- 35,38 ----
***************
*** 56,60 ****
smartLocalRef.setContextClassLoader();
! Method delegateMethod = getMethod(method);
if (delegateMethod != null) {
Invocation invocation = new Invocation(localObject, delegateMethod, args);
--- 54,62 ----
smartLocalRef.setContextClassLoader();
! Method delegateMethod = (Method)methods.get(method);
! if (delegateMethod != null)
! return delegateMethod.invoke(delegate, args);
!
! delegateMethod = getMethod(method);
if (delegateMethod != null) {
Invocation invocation = new Invocation(localObject, delegateMethod, args);
***************
*** 63,70 ****
}
- delegateMethod = (Method)methods.get(method);
- if (delegateMethod != null)
- return delegateMethod.invoke(delegate, args);
-
throw new EJBException("no such method: " + method);
}
--- 65,68 ----
***************
*** 107,110 ****
--- 105,109 ----
throws RemoveException, EJBException
{
+ System.err.println("ERROR: should not be called");
}
Index: SmartRef.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/SmartRef.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** SmartRef.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- SmartRef.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 54,64 ****
List interceptors = new LinkedList();
interceptors.addAll(ejbRefMetaData.getInterceptors());
! interceptors.add(ejbRefMetaData.getTransport());
Interceptor current;
ListIterator it = interceptors.listIterator(interceptors.size());
while (it.hasPrevious()) {
! String name = (String)it.previous();
! Class clazz = getClass().getClassLoader().loadClass(name);
current = (Interceptor)clazz.newInstance();
current.setNext(interceptor);
--- 54,66 ----
List interceptors = new LinkedList();
interceptors.addAll(ejbRefMetaData.getInterceptors());
! InterceptorMetaData transportMetaData = new InterceptorMetaData();
! transportMetaData.setName(ejbRefMetaData.getTransport());
! interceptors.add(transportMetaData);
Interceptor current;
ListIterator it = interceptors.listIterator(interceptors.size());
while (it.hasPrevious()) {
! InterceptorMetaData interceptorMetaData = (InterceptorMetaData)it.previous();
! Class clazz = getClass().getClassLoader().loadClass(interceptorMetaData.getName());
current = (Interceptor)clazz.newInstance();
current.setNext(interceptor);
Index: SmartRefObject.java
===================================================================
RCS file: /cvsroot/smartcc/smartcc/src/org/smartcc/SmartRefObject.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** SmartRefObject.java 27 May 2002 16:22:01 -0000 1.1.1.1
--- SmartRefObject.java 29 May 2002 08:12:12 -0000 1.2
***************
*** 37,42 ****
methods.put(EJBObject.class.getMethod("getPrimaryKey", null),
Delegate.class.getMethod("getPrimaryKey", null));
- methods.put(EJBObject.class.getMethod("remove", null),
- Delegate.class.getMethod("remove", null));
methods.put(EJBObject.class.getMethod("isIdentical", new Class[] { EJBObject.class }),
Delegate.class.getMethod("isIdentical", new Class[] { EJBObject.class }));
--- 37,40 ----
***************
*** 58,62 ****
smartRef.setContextClassLoader();
! Method delegateMethod = getMethod(method);
if (delegateMethod != null) {
Invocation invocation = new Invocation(handle.getTargetHandle(), delegateMethod, args);
--- 56,64 ----
smartRef.setContextClassLoader();
! Method delegateMethod = (Method)methods.get(method);
! if (delegateMethod != null)
! return delegateMethod.invoke(delegate, args);
!
! delegateMethod = getMethod(method);
if (delegateMethod != null) {
Invocation invocation = new Invocation(handle.getTargetHandle(), delegateMethod, args);
***************
*** 65,72 ****
}
- delegateMethod = (Method)methods.get(method);
- if (delegateMethod != null)
- return delegateMethod.invoke(delegate, args);
-
throw new EJBException("no such method: " + method);
}
--- 67,70 ----
***************
*** 75,80 ****
}
catch (Exception e) {
- System.err.println(e.getMessage());
- e.printStackTrace(System.err);
throw e;
}
--- 73,76 ----
***************
*** 103,107 ****
throws EJBException
{
! return null;
}
--- 99,103 ----
throws EJBException
{
! return handle;
}
***************
*** 115,118 ****
--- 111,115 ----
throws RemoveException, EJBException
{
+ System.err.println("ERROR: should not be called");
}
|
|
From: <he...@us...> - 2002-05-29 08:12:17
|
Update of /cvsroot/smartcc/smartcc/bin
In directory usw-pr-cvs1:/tmp/cvs-serv23271/bin
Added Files:
replay
Log Message:
o fixed some bugs regarding interceptors
o implemented the recorder and replay tool
--- NEW FILE: replay ---
#!/bin/sh
if [ "$JAVA_HOME" == "" ]
then
echo "please set \$JAVA_HOME"
exit
fi
## resolve links - $0 may be a link
PRG=$0
progname=`basename $0`
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname $PRG`/$link"
fi
done
HOME=`dirname "$PRG"`/..
AUTH_CONF=-Djava.security.auth.login.config=file:$HOME/etc/auth.conf
#unset CLASSPATH
for f in $HOME/dist/client/*.jar
do
CLASSPATH=$CLASSPATH:$f
done
export CLASSPATH
$JAVA_HOME/bin/java $AUTH_CONF $ARGS org.smartcc.replay.Simulator $@
|
|
From: <he...@us...> - 2002-05-29 08:12:17
|
Update of /cvsroot/smartcc/smartcc
In directory usw-pr-cvs1:/tmp/cvs-serv23271
Modified Files:
build.xml
Log Message:
o fixed some bugs regarding interceptors
o implemented the recorder and replay tool
Index: build.xml
===================================================================
RCS file: /cvsroot/smartcc/smartcc/build.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** build.xml 28 May 2002 10:10:27 -0000 1.3
--- build.xml 29 May 2002 08:12:12 -0000 1.4
***************
*** 49,54 ****
--- 49,56 ----
<classpath refid="build.classpath" />
<exclude name="org/smartcc/login/Was4LoginModule.java"/>
+ <exclude name="org/smartcc/replay/JBossClient.java"/>
</javac>
<antcall target="compile.was4"/>
+ <antcall target="compile.jboss"/>
</target>
***************
*** 60,63 ****
--- 62,75 ----
<classpath refid="build.classpath" />
<include name="org/smartcc/login/Was4LoginModule.java"/>
+ </javac>
+ </target>
+
+ <target name="compile.jboss" depends="prepare" if="jboss">
+ <javac srcdir="src" destdir="${build.class}"
+ debug="${build.debug}"
+ deprecation="${build.deprecation}"
+ encoding="ISO8859-1">
+ <classpath refid="build.classpath" />
+ <include name="org/smartcc/replay/JBossClient.java"/>
</javac>
</target>
|