General
Question to Crispy Framework
Crispy is precedenced for the client.
The server must now Crispy when:
A service has two parts: a interface and a implementation from the interface.
Example:
public interface Calculator { public int add(int a, int b); public int subtract(int a, int b); }
public class CalculatorImpl implements Calculator { public int add(int a, int b) { return a + b; } public int subtract(int a, int b) { return a - b; } }
All properties to the Service technology must set with properties and the other properties can you set. For example: Property.EXECUTER_CLASS or Property.REMOTE_URL_AND_PORT.
Properties to extend Crispy, can set about the ServiceManager. For example: Property.INTERCEPTOR_CLASS or Property.MODIFIER_CLASS.
// with properties Properties prop = new Properties(); // this can you set in properties and with the ServiceManager prop.put(Property.INTERCEPTOR_CLASS, StopWatchInterceptor.class.getName()); prop.put(Property.REMOTE_URL_AND_PORT, "http://localhost:9090"); prop.put(Property.EXECUTOR_CLASS, XmlRpcExecutor.class.getName()); // with ServiceManager ServiceManager serviceManager = new ServiceManager(prop); serviceManager.setModifier(new MyModifier()); serviceManager.addInterceptor(new MyInterceptor ());
By problems you can activate the logger, to get more details about the working of Crispy. It are two possibilities. You can turn on the jdk logger API with:
net.sf.crispy.util.Util.initJdkLogger();
The second possibility is the apache Log4J logging API. This API can you activate with:
PropertyConfigurator.configure("..."); // replace ... with the configuration property file