Hi!
We've used eclipse "create a patch" and standard diff options.
Hope it helps!
Regards,
Oscar.
Index: src/org/apache/pluto/portalImpl/Servlet.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/Servlet.java,v
retrieving revision 1.1
diff -r1.1 Servlet.java
156a157,177
>
> String theService = servletRequest.getParameter("hotService");
> if (theService != null) {
> try {
>
ServiceManager.hotInit(getServletConfig(), theService);
> } catch (Throwable exc) {
> log("Initialization failed!", exc);
> throw (new
javax.servlet.UnavailableException(
> "Initialization of one
or more services failed."));
> }
>
> try {
>
ServiceManager.postHotInit(getServletConfig(), theService);
> } catch (Throwable expos) {
> log("Post initialization failed!",
expos);
> throw (new
javax.servlet.UnavailableException(
> "Post initialization of
one or more services failed."));
> }
>
servletResponse.getOutputStream().println("Service reloaded.");
> return;
> }
157a179,180
>
>
Index: src/org/apache/pluto/portalImpl/services/ServiceManager.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/ServiceMa
nager.java,v
retrieving revision 1.1
diff -r1.1 ServiceManager.java
316a317,497
>
>
>
> public static void hotInit (ServletConfig aConfig, String
theService) throws Exception
> {
> hotInit (aConfig, SERVICES_CONFIG_FILE,
SERVICES_CONFIG_DIR, theService);
> }
>
> public static void hotInit(ServletConfig aConfig,
> String aServiceConfigFile, String
aServiceConfigDir, String theService)
> throws Exception {
> // avoid duplicate initialization of services
>
> if (!cInitialized) {
> synchronized (ServiceManager.class) {
> if (!cInitialized) {
> cInitialized = true;
> } else {
> return;
> }
> }
> } else {
> return;
> }
>
> ServletContext context = null;
>
> if (aConfig != null)
> context = aConfig.getServletContext();
>
> if (context != null)
> context.log("ServiceManager: HOTHOT
Loading service:
> "+theService);
>
> Properties props = new Properties();
>
> try {
>
props.load(context.getResourceAsStream(aServiceConfigFile));
> } catch (IOException exc) {
> if (context != null)
> context.log("ServiceManager:
File \"" + aServiceConfigFile
> + "\" cannot be
found or read.");
> throw new Exception("ServiceManager:
File \"" + aServiceConfigFile
> + "\" cannot be found or
read.");
> }
>
> int numAll = 0;
> int numSuccessful = 0;
>
> for (Iterator iter = props.names();
iter.hasNext();) {
> String serviceBaseName = (String)
iter.next();
>
> if (serviceBaseName.equals(theService))
{
> context.log("ServiceManager:
Service "+theService+" FOUND!!");
> numAll++;
>
> // ty to get hold of the base
service
> Class serviceBase;
> try {
> serviceBase =
Class.forName(serviceBaseName);
> } catch (ClassNotFoundException
exc) {
> if (context != null)
>
context.log("ServiceManager: A service with name "
>
+ serviceBaseName + " cannot be found.");
> continue;
> }
>
> String serviceImplName =
props.getString(serviceBaseName);
> Class serviceImpl = null;
> Service service = null;
> try {
> serviceImpl =
Class.forName(serviceImplName);
> service = (Service)
serviceImpl.newInstance();
> Properties serviceProps
= new Properties();
> try {
> InputStream is =
null;
> is =
context.getResourceAsStream(aServiceConfigDir
>
+ StringUtils.nameOf(serviceImpl)
>
+ ".properties");
> if (is == null)
> is =
context.getResourceAsStream(aServiceConfigDir
>
+ StringUtils.nameOf(serviceBase)
>
+ ".properties");
> if (is != null)
>
serviceProps.load(is);
> } catch (IOException
exc) {
> // ignore -- we
go without properties then
> }
> if (context != null)
>
context.log(StringUtils.nameOf(serviceBase)
>
+ " initializing...");
>
> service.init(aConfig,
serviceProps);
>
> if (context != null)
>
context.log(StringUtils.nameOf(serviceBase) + " done.");
> } catch (ClassNotFoundException
exc) {
> if (context != null)
> context
>
.log(
>
"ServiceManager: A service implementation with name "
>
+ serviceImplName
>
+ " cannot be found.", exc);
> continue;
> } catch (ClassCastException exc)
{
> if (context != null)
>
context.log("ServiceManager: Service implementation "
>
+ serviceImplName
>
+ " is not a service of the required type.",
>
exc);
> continue;
> } catch (InstantiationException
exc) {
> if (context != null)
>
context.log("ServiceManager: Service implementation "
>
+ serviceImplName + " cannot be instantiated.",
>
exc);
> continue;
> } catch (Exception exc) {
> if (context != null)
> context
>
.log(
>
"ServiceManager: An unidentified error occurred",
>
exc);
> service = null;
> }
>
> if (service != null) {
>
cServicesMap.put(serviceBase, service);
> // build up list in
reverse order for later destruction
> cServicesList.add(0,
service);
> numSuccessful++;
> }
> }
> }
>
> if (context != null)
> context.log("ServiceManager: Services
initialized ("
> + numSuccessful + "/" +
numAll + " successful).");
> if (numSuccessful != numAll) {
> throw new Exception("ServiceManager:
Services initialized ("
> + numSuccessful + "/" +
numAll + " successful).");
> }
> }
>
> public static void postHotInit(ServletConfig aConfig, String
theService) {
> // avoid duplicate destruction of services
>
> if (cInitialized)
> {
> synchronized (ServiceManager.class)
> {
> if (cInitialized)
> {
> cInitialized = false;
> }
> else
> {
> return;
> }
> }
> }
> else
> {
> return;
> }
>
> ServletContext context = null;
>
> if (aConfig != null)
> context = aConfig.getServletContext ();
>
> // post init all services
> try {
> Service service = (Service)
cServicesMap.get(Class.forName(theService));
> service.postInit(aConfig);
> } catch (Exception exc) {
> if (context != null)
> context.log("ServiceManager:
Service couldn't be started (postInit) after init..",exc);
> }
>
> }
>
Index:
src/org/apache/pluto/portalImpl/services/pageregistry/PageRegistry.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/pageregis
try/PageRegistry.java,v
retrieving revision 1.1
diff -r1.1 PageRegistry.java
36c36
< private final static PageRegistryService cService =
---
> private static PageRegistryService cService =
46a47,51
> }
>
> public static void setRootFragment()
> {
> cService = (PageRegistryService)
ServiceManager.getService
> (PageRegistryService.class);
Index:
src/org/apache/pluto/portalImpl/services/pageregistry/PageRegistryServic
eFileImpl.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/pageregis
try/PageRegistryServiceFileImpl.java,v
retrieving revision 1.1
diff -r1.1 PageRegistryServiceFileImpl.java
66c66
< private HashMap fragments = new HashMap();
---
> private static HashMap fragments = new HashMap();
99a100
> fragments = new HashMap();
101c102,103
<
---
> PageRegistry.setRootFragment();
>
Index:
src/org/apache/pluto/portalImpl/services/portletdefinitionregistry/Portl
etDefinitionRegistry.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/portletde
finitionregistry/PortletDefinitionRegistry.java,v
retrieving revision 1.1
diff -r1.1 PortletDefinitionRegistry.java
37c37
< private final static PortletDefinitionRegistryService cService =
---
> private static PortletDefinitionRegistryService cService =
57a58,62
> }
>
> public static void setPortletDefinitionRegistryService()
> {
> PortletDefinitionRegistryService cService =
> (PortletDefinitionRegistryService) ServiceManager.getService
(PortletDefinitionRegistryService.class);
Index:
src/org/apache/pluto/portalImpl/services/portletdefinitionregistry/Portl
etDefinitionRegistryServiceContextImpl.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/portletde
finitionregistry/PortletDefinitionRegistryServiceContextImpl.java,v
retrieving revision 1.1
diff -r1.1 PortletDefinitionRegistryServiceContextImpl.java
66,67c66,67
< private Mapping webXmlMapping;
< private Mapping portletXmlMapping;
---
> private static Mapping webXmlMapping;
> private static Mapping portletXmlMapping;
69,70c69,70
< private PortletApplicationDefinitionListImpl registry;
< private Map definitions;
---
> private static PortletApplicationDefinitionListImpl registry;
> private static Map definitions;
103a104,109
> public void postInit() throws Exception
> {
> PortletDefinitionRegistry.setPortletDefinitionRegistryService();
> }
>
>
Index:
src/org/apache/pluto/portalImpl/services/portletdefinitionregistry/Portl
etDefinitionRegistryServiceFileImpl.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/portletde
finitionregistry/PortletDefinitionRegistryServiceFileImpl.java,v
retrieving revision 1.1
diff -r1.1 PortletDefinitionRegistryServiceFileImpl.java
165a166,170
> public void postInit() throws Exception
> {
>
PortletDefinitionRegistry.setPortletDefinitionRegistryService();
> }
>
Index:
src/org/apache/pluto/portalImpl/services/portletentityregistry/PortletEn
tityRegistry.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/portleten
tityregistry/PortletEntityRegistry.java,v
retrieving revision 1.1
diff -r1.1 PortletEntityRegistry.java
37c37
< private final static PortletEntityRegistryService cService =
---
> private static PortletEntityRegistryService cService =
47a48,52
> }
>
> public static void setPortletEntityRegistryService()
> {
> cService = (PortletEntityRegistryService)
> ServiceManager.getService (PortletEntityRegistryService.class);
Index:
src/org/apache/pluto/portalImpl/services/portletentityregistry/PortletEn
tityRegistryServiceFileImpl.java
===================================================================
RCS file:
/pry/pluto/pluto-orig/src/org/apache/pluto/portalImpl/services/portleten
tityregistry/PortletEntityRegistryServiceFileImpl.java,v
retrieving revision 1.1
diff -r1.1 PortletEntityRegistryServiceFileImpl.java
96a97,100
>
> public void postInit() throws Exception {
> PortletEntityRegistry.setPortletEntityRegistryService();
> }
******************AVISO LEGAL**********************
Este mensaje es privado y confidencial y solamente para la persona a la que va
dirigido. Si usted ha recibido este mensaje por error, no debe revelar, copiar,
distribuir o usarlo en ningun sentido. Le rogamos lo comunique al remitente y
borre dicho mensaje y cualquier documento adjunto que pudiera contener. No hay
renuncia a la confidencialidad ni a ningun privilegio por causa de transmision
erronea o mal funcionamiento. Cualquier opinion expresada en este mensaje
pertenece unicamente al autor remitente, y no representa necesariamente la
opinion de Santander Central Hispano, a no ser que expresamente se diga y el
remitente este autorizado para hacerlo. Los correos electronicos no son
seguros, no garantizan la confidencialidad ni la correcta recepcion de los
mismos, dado que pueden ser interceptados, manipulados, destruidos, llegar con
demora, incompletos, o con virus. Santander Central Hispano no se hace
responsable de las alteraciones que pudieran hacerse al mensaje una vez
enviado.Este mensaje solo tiene una finalidad de informacion, y no debe
interpretarse como una oferta de venta o de compra de valores ni de
instrumentos financieros relacionados. En el caso de que el destinatario de
este mensaje no consintiera la utilizacion del correo electronico via Internet,
rogamos lo ponga en nuestro conocimiento.
**********************DISCLAIMER*****************
This message is private and confidential and it is intended exclusively for the
addressee. If you receive this message by mistake, you should not disseminate,
distribute or copy this e-mail. Please inform the sender and delete the message
and attachments from your system. No confidentiality nor any privilege
regarding the information is waived or lost by any mistransmission or
malfunction.Any views or opinions contained in this message are solely those of
the author, and do not necessarily represent those of Santander Central
Hispano, unless otherwise specifically stated and the sender is authorised to
do so.E-mail transmission cannot be guaranteed to be secure, confidential, or
error-free, as information could be intercepted, corrupted, lost, destroyed,
arrive late, incomplete, or contain viruses. Santander Central Hispano does not
accept responsibility for any changes in the contents of this message after it
has been sent.This message is provided for informational purposes and should
not be construed as a solicitation or offer to buy or sell any securities or
related financial instruments. If the addressee of this message does not
consent to the use of internet e-mail, please communicate it to us.