perfsonar-dev - Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine
Subject: perfsonar development work
List archive
Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine
Chronological Thread
- From: Roman Lapacz <>
- To: Michael Bischoff <>
- Cc: "" <>
- Subject: Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine
- Date: Tue, 28 Aug 2007 13:03:13 +0200
Hi Michael,
I see that you have done some updates in the base. I've skimmed them quickly and they seems to improve some things. Could you send some information about them and the intention behind? The base is a core piece of all our java services and its changes are crucial. We have to be sure that they are tested and known by other developers before committing to the final svn location.
Roman
wrote:
Author: michael.bischoff
Date: 2007-08-27 19:27:19 -0400 (Mon, 27 Aug 2007)
New Revision: 2738
Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
Log:
improved logging
Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
===================================================================
---
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
2007-08-27 23:05:59 UTC (rev 2737)
+++
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
2007-08-27 23:27:19 UTC (rev 2738)
@@ -36,66 +36,47 @@
throws PerfSONARException {
// get a logger
- LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
- getInstance().getComponent(ComponentNames.LOGGER);
+ LoggerComponent logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
Class engineClass = null;
// try to get the class for the given className
try {
-
engineClass = Class.forName(engineClassName);
-
} catch (ClassNotFoundException e) {
-
// class not found
- logger.fatal("ServiceEngineFactory: class not found for name: "
- + engineClassName);
- throw new PerfSONARException("ServiceEngineFactory: ClassNotFound:
"
- + engineClassName);
-
+ logger.fatal("ServiceEngineFactory: class not found for name:
"+engineClassName);
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: ClassNotFound: "+
engineClassName
+ );
}
ServiceEngine engine = null;
// get an instance of it
try {
-
engine = (ServiceEngine) engineClass.newInstance();
-
} catch (ClassCastException e1) {
-
- logger.fatal(
- "ServiceEngineFactory: class cast exception while "
- + "trying to instantiate: " + engineClassName);
-
- throw new PerfSONARException("ServiceEngineFactory: class cast
exception while "
- + "trying to instantiate: " + engineClassName);
-
-
+ logger.fatal("ServiceEngineFactory: specified class doesn't implement
ServiceEngine: " + engineClassName);
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: specified class("+engineClassName+")
doesn't implement ServiceEngine"
+ );
} catch (InstantiationException e1) {
-
- logger.fatal(
- "ServiceEngineFactory: class instantiaiton exception while "
- + "trying to instantiate: " + engineClassName);
-
- throw new PerfSONARException("ServiceEngineFactory: class
instantiation "
- + "exception for " + engineClassName);
-
+ logger.fatal("ServiceEngineFactory: Couldn't instanciate class
("+engineClassName+") Perhaps there isn't a no arg constructor?");
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: Couldn't instanciate class
("+engineClassName+") Perhaps there isn't a no arg constructor?"
+ );
} catch (IllegalAccessException e1) {
-
- logger.fatal("ServiceEngineFactory: class instantiation is illegal
"
- + "for: " + engineClassName);
- throw new PerfSONARException("ServiceEngineFactory:
IllegalAccessException "
- + "while instantiating "+engineClassName);
-
+ logger.fatal("ServiceEngineFactory: IllegalAccessException couldn't
instanciate: " + engineClassName);
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: IllegalAccessException couldn't
instanciate: "+engineClassName
+ );
}
-
return engine;
-
}
-
-
-
}
- perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, svnlog, 08/27/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, Roman Lapacz, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, Roman Lapacz, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, Maciej Glowiak, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsona r/service/base/engine, Michael Bischoff, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsona r/service/base/engine, Michael Bischoff, 08/29/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsona r/service/base/engine, Michael Bischoff, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, Maciej Glowiak, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, Roman Lapacz, 08/28/2007
- Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine, Roman Lapacz, 08/28/2007
Archive powered by MHonArc 2.6.16.