1 5 6 package org.exoplatform.services.wsrp.producer.impl.utils; 7 8 9 import java.rmi.RemoteException ; 10 import org.exoplatform.services.wsrp.exceptions.Exception2Fault; 11 import org.exoplatform.services.wsrp.exceptions.Faults; 12 import org.exoplatform.services.wsrp.exceptions.WSRPException; 13 import org.exoplatform.services.wsrp.type.RegistrationContext; 14 15 21 22 public class Utils { 23 public static void testRegistration(RegistrationContext registrationContext, 24 org.exoplatform.services.wsrp.producer.PersistentStateManager stateManager) 25 throws RemoteException { 26 try { 27 if (!stateManager.isRegistered(registrationContext)) { 28 Exception2Fault.handleException(new WSRPException(Faults.INVALID_REGISTRATION_FAULT)); 29 } 30 } catch (WSRPException e) { 31 Exception2Fault.handleException(e); 32 } 33 } 34 } | Popular Tags |