congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DiscoveryException
Code IndexAdd Tabnine to your IDE (free)

How to use
DiscoveryException
in
org.eclipse.persistence.exceptions

Best Java code snippets using org.eclipse.persistence.exceptions.DiscoveryException (Showing top 20 results out of 315)

origin: com.haulmont.thirdparty/eclipselink

  public static DiscoveryException errorReceivingAnnouncement(Exception internalEx) {
    Object[] args = {  };
    DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_RECEIVING_ANNOUNCEMENT, args));
    ex.setErrorCode(ERROR_RECEIVING_ANNOUNCEMENT);
    ex.setInternalException(internalEx);
    return ex;
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Create the multicast socket and join the multicast group.
 */
public void createCommunicationSocket() {
  Object[] args = { multicastGroupAddress, "" + multicastPort };
  rcm.logDebug("initializing_discovery_resources", args);
  if (communicationSocket == null) {
    try {
      communicationSocket = new MulticastSocket(multicastPort);
      communicationSocket.setTimeToLive(getPacketTimeToLive());
      communicationSocket.joinGroup(InetAddress.getByName(multicastGroupAddress));
    } catch (IOException ex) {
      // Either we couldn't create the socket or we couldn't join the group
      DiscoveryException discoveryEx = DiscoveryException.errorJoiningMulticastGroup(ex);
      rcm.handleException(discoveryEx);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Send out an announcement that we are here.
 */
public void announceSession() {
  rcm.logDebug("sending_announcement", (Object[])null);
  ServiceAnnouncement outMsg = new ServiceAnnouncement(rcm.getServiceId());
  byte[] outBytes = outMsg.toBytes();
  try {
    // Create a packet to send and send it out to everyone listening
    DatagramPacket sendPacket = new DatagramPacket(outBytes, outBytes.length, InetAddress.getByName(multicastGroupAddress), multicastPort);
    getCommunicationSocket().send(sendPacket);
    Object[] args = null;
    rcm.logInfo("announcement_sent", args);
  } catch (Exception ex) {
    // We got an exception. Map it to an RCM exception and call the handler
    DiscoveryException discoveryEx = DiscoveryException.errorSendingAnnouncement(ex);
    rcm.handleException(discoveryEx);
  }
}
origin: com.haulmont.thirdparty/eclipselink

} else {
  rcm.handleException(DiscoveryException.errorReceivingAnnouncement(exception));
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Create the multicast socket and join the multicast group.
 */
public void createCommunicationSocket() {
  Object[] args = { multicastGroupAddress, "" + multicastPort };
  rcm.logDebug("initializing_discovery_resources", args);
  if (communicationSocket == null) {
    try {
      communicationSocket = new MulticastSocket(multicastPort);
      communicationSocket.setTimeToLive(getPacketTimeToLive());
      communicationSocket.joinGroup(InetAddress.getByName(multicastGroupAddress));
    } catch (IOException ex) {
      // Either we couldn't create the socket or we couldn't join the group
      DiscoveryException discoveryEx = DiscoveryException.errorJoiningMulticastGroup(ex);
      rcm.handleException(discoveryEx);
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Send out an announcement that we are here.
 */
public void announceSession() {
  rcm.logDebug("sending_announcement", (Object[])null);
  ServiceAnnouncement outMsg = new ServiceAnnouncement(rcm.getServiceId());
  byte[] outBytes = outMsg.toBytes();
  try {
    // Create a packet to send and send it out to everyone listening
    DatagramPacket sendPacket = new DatagramPacket(outBytes, outBytes.length, InetAddress.getByName(multicastGroupAddress), multicastPort);
    getCommunicationSocket().send(sendPacket);
    Object[] args = null;
    rcm.logInfo("announcement_sent", args);
  } catch (Exception ex) {
    // We got an exception. Map it to an RCM exception and call the handler
    DiscoveryException discoveryEx = DiscoveryException.errorSendingAnnouncement(ex);
    rcm.handleException(discoveryEx);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

} else {
  rcm.handleException(DiscoveryException.errorReceivingAnnouncement(exception));
origin: org.eclipse.persistence/org.eclipse.persistence.core

public static DiscoveryException errorJoiningMulticastGroup(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_JOINING_MULTICAST_GROUP, args));
  ex.setErrorCode(ERROR_JOINING_MULTICAST_GROUP);
  ex.setInternalException(internalEx);
  return ex;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Create the multicast socket and join the multicast group.
 */
public void createCommunicationSocket() {
  Object[] args = { multicastGroupAddress, "" + multicastPort };
  rcm.logDebug("initializing_discovery_resources", args);
  if (communicationSocket == null) {
    try {
      communicationSocket = new MulticastSocket(multicastPort);
      communicationSocket.setTimeToLive(getPacketTimeToLive());
      communicationSocket.joinGroup(InetAddress.getByName(multicastGroupAddress));
    } catch (IOException ex) {
      // Either we couldn't create the socket or we couldn't join the group
      DiscoveryException discoveryEx = DiscoveryException.errorJoiningMulticastGroup(ex);
      rcm.handleException(discoveryEx);
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Send out an announcement that we are here.
 */
public void announceSession() {
  rcm.logDebug("sending_announcement", (Object[])null);
  ServiceAnnouncement outMsg = new ServiceAnnouncement(rcm.getServiceId());
  byte[] outBytes = outMsg.toBytes();
  try {
    // Create a packet to send and send it out to everyone listening
    DatagramPacket sendPacket = new DatagramPacket(outBytes, outBytes.length, InetAddress.getByName(multicastGroupAddress), multicastPort);
    getCommunicationSocket().send(sendPacket);
    Object[] args = null;
    rcm.logInfo("announcement_sent", args);
  } catch (Exception ex) {
    // We got an exception. Map it to an RCM exception and call the handler
    DiscoveryException discoveryEx = DiscoveryException.errorSendingAnnouncement(ex);
    rcm.handleException(discoveryEx);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

} else {
  rcm.handleException(DiscoveryException.errorReceivingAnnouncement(exception));
origin: org.eclipse.persistence/org.eclipse.persistence.core

public static DiscoveryException errorLookingUpLocalHost(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_LOOKING_UP_LOCAL_HOST, args));
  ex.setErrorCode(ERROR_LOOKING_UP_LOCAL_HOST);
  ex.setInternalException(internalEx);
  return ex;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public static DiscoveryException errorSendingAnnouncement(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_SENDING_ANNOUNCEMENT, args));
  ex.setErrorCode(ERROR_SENDING_ANNOUNCEMENT);
  ex.setInternalException(internalEx);
  return ex;
}
origin: com.haulmont.thirdparty/eclipselink

public static DiscoveryException errorJoiningMulticastGroup(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_JOINING_MULTICAST_GROUP, args));
  ex.setErrorCode(ERROR_JOINING_MULTICAST_GROUP);
  ex.setInternalException(internalEx);
  return ex;
}
origin: com.haulmont.thirdparty/eclipselink

public static DiscoveryException errorSendingAnnouncement(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_SENDING_ANNOUNCEMENT, args));
  ex.setErrorCode(ERROR_SENDING_ANNOUNCEMENT);
  ex.setInternalException(internalEx);
  return ex;
}
origin: com.haulmont.thirdparty/eclipselink

public static DiscoveryException errorLookingUpLocalHost(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_LOOKING_UP_LOCAL_HOST, args));
  ex.setErrorCode(ERROR_LOOKING_UP_LOCAL_HOST);
  ex.setInternalException(internalEx);
  return ex;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  public static DiscoveryException errorReceivingAnnouncement(Exception internalEx) {
    Object[] args = {  };
    DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_RECEIVING_ANNOUNCEMENT, args));
    ex.setErrorCode(ERROR_RECEIVING_ANNOUNCEMENT);
    ex.setInternalException(internalEx);
    return ex;
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

  public static DiscoveryException errorReceivingAnnouncement(Exception internalEx) {
    Object[] args = {  };
    DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_RECEIVING_ANNOUNCEMENT, args));
    ex.setErrorCode(ERROR_RECEIVING_ANNOUNCEMENT);
    ex.setInternalException(internalEx);
    return ex;
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public static DiscoveryException errorJoiningMulticastGroup(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_JOINING_MULTICAST_GROUP, args));
  ex.setErrorCode(ERROR_JOINING_MULTICAST_GROUP);
  ex.setInternalException(internalEx);
  return ex;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

public static DiscoveryException errorSendingAnnouncement(Exception internalEx) {
  Object[] args = {  };
  DiscoveryException ex = new DiscoveryException(ExceptionMessageGenerator.buildMessage(DiscoveryException.class, ERROR_SENDING_ANNOUNCEMENT, args));
  ex.setErrorCode(ERROR_SENDING_ANNOUNCEMENT);
  ex.setInternalException(internalEx);
  return ex;
}
org.eclipse.persistence.exceptionsDiscoveryException

Javadoc

Instances of this exception are raised if a problem is detected during the discovery of a TopLink cluster. This occurs as part of the RemoteCommandManager feature. TopLink exceptions should only ever be thrown by TopLink code.

Most used methods

  • <init>
  • errorJoiningMulticastGroup
  • errorReceivingAnnouncement
  • errorSendingAnnouncement
  • setErrorCode
  • setInternalException

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now