Hello,
I've some problems with spring and the PluginManager. Every help is appreciated.
I try to instantiate a class using Spring. One property of the class is a name
of a DisseminationCrosswalk. When I get the name of the crosswalk I would like
to get an instance of the crosswalk using the PluginManager. This is done by
the following method:
public void setDisseminationCrosswalkName(String CROSSWALK_NAME) {
this.CROSSWALK_NAME = CROSSWALK_NAME;
this.xwalk = (DisseminationCrosswalk) PluginManager.getNamedPlugin(
DisseminationCrosswalk.class, CROSSWALK_NAME);
// FIXME handle the case if the crosswalk can't be found
if (this.xwalk == null)
{
throw new IllegalArgumentException("Can't find crosswalk '" +
CROSSWALK_NAME + "'!");
}
}
When Spring instantiate this class it fails with the following message:
"Property 'disseminationCrosswalkName' threw exception; nested exception is
java.lang.IllegalStateException: Cannot find
dspace.cfg:java.lang.RuntimeException: Failed to startup the DSpace Service
Manager: failure starting up spring service manager".
If I remove the line that uses the PluginManager everything works fine. So my
question is: is there a way to instantiate a class using spring after the
dspace.cfg got loaded? Or what else can I do instantiate the crosswalk?
Thanks in advanced,
Kind regards,
Pascal
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel