Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SERVER:
- static {
- try {
- MARSHALLER_FACTORY = Marshalling.getMarshallerFactory("river", Module.getModuleFromDefaultLoader(ModuleIdentifier.fromString("org.jboss.marshalling.river")).getClassLoader());
- } catch (ModuleLoadException e) {
- throw new RuntimeException(e);
- }
- CONFIG = new MarshallingConfiguration();
- CONFIG.setVersion(2);
- try {
- CONFIG.setClassResolver(new SimpleClassResolver(Module.getModuleFromCurrentLoader(module).getClassLoader()));
- } catch(Exception e) {
- throw new RuntimeException(e);
- }
- }
- CLIENT:
- static {
- MARSHALLER_FACTORY = Marshalling.getMarshallerFactory("river");
- CONFIG = new MarshallingConfiguration();
- CONFIG.setVersion(2);
- CONFIG.setClassResolver(new SimpleClassResolver(ProtocolUtils.class.getClassLoader()));
- }
- private ProtocolUtils() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement