Package com.sun.messaging

Examples of com.sun.messaging.AdministeredObject


    public static Object updateTopic(Object oldObj, Properties objProps,
             String readOnlyValue
            throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.Topic();
  /*
   * Copy the properties from old object to new object.
View Full Code Here


    public static Object updateQueue(Object oldObj, Properties objProps,
             String readOnlyValue
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.Queue();
  /*
   * Copy the properties from old object to new object.
View Full Code Here

    public static Object updateTopicConnectionFactory(Object oldObj,
      Properties objProps, String readOnlyValue)
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.TopicConnectionFactory();

  if (oldObj instanceof AdministeredObject) {
View Full Code Here

    public static Object updateXATopicConnectionFactory(Object oldObj,
      Properties objProps, String readOnlyValue)
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.XATopicConnectionFactory();

  if (oldObj instanceof AdministeredObject) {
View Full Code Here

    public static Object updateQueueConnectionFactory(Object oldObj,
      Properties objProps, String readOnlyValue)
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.QueueConnectionFactory();

  if (oldObj instanceof AdministeredObject) {
View Full Code Here

    public static Object updateConnectionFactory(Object oldObj,
      Properties objProps, String readOnlyValue)
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.ConnectionFactory();

  if (oldObj instanceof AdministeredObject) {
View Full Code Here

    public static Object updateXAQueueConnectionFactory(Object oldObj,
      Properties objProps, String readOnlyValue)
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.XAQueueConnectionFactory();

  if (oldObj instanceof AdministeredObject) {
View Full Code Here

    public static Object updateXAConnectionFactory(Object oldObj,
      Properties objProps, String readOnlyValue)
        throws JMSException {

  AdministeredObject newObj = null;
  String value;

  newObj = (AdministeredObject)new com.sun.messaging.XAConnectionFactory();

  if (oldObj instanceof AdministeredObject) {
View Full Code Here

  // compatible with the current product version.
  // No need to check for invalid/missing version number, as
  // an exception must have been already thrown if that
  // was the case.
        if (object instanceof AdministeredObject) {
      AdministeredObject adminObj = (AdministeredObject)object;
      String curVersion = adminObj.getVERSION();
      String objVersion = adminObj.getStoredVersion();

            if (!adminObj.isStoredVersionCompatible()) {
    int response = JOptionPane.showOptionDialog(this,
                    acr.getString(acr.W_INCOMPATIBLE_OBJ, objVersion, curVersion),
                    acr.getString(acr.I_OBJSTORE_DEST_PROPS)
                        + ": "
                        + acr.getString(acr.I_WARNING_CODE, acr.W_INCOMPATIBLE_OBJ),
                  JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,
        null, okcancel, okcancel[1]);

          if (response == JOptionPane.NO_OPTION)
        return;
      }
  }

  /*
   * Lookup Name
   */
  String lookupName = lookupLabel.getText();
  lookupName = lookupName.trim();

  if (lookupName == null || lookupName.equals("")) {
      JOptionPane.showOptionDialog(this,
    acr.getString(acr.E_NO_LOOKUP_NAME),
    acr.getString(acr.I_OBJSTORE_DEST_PROPS) + ": " +
                    acr.getString(acr.I_ERROR_CODE,
                          AdminConsoleResources.E_NO_LOOKUP_NAME),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.ERROR_MESSAGE, null, close, close[0]);
      return;
  }
 
  /*
   * Destination Type
   */
  int type = ObjAdminEvent.QUEUE;
  AdministeredObject tempObj = null;

  if (destLabel.getText().equals(acr.getString(acr.I_QUEUE))) {
      type = ObjAdminEvent.QUEUE;
      tempObj = (AdministeredObject)new com.sun.messaging.Queue();
  }
  else if (destLabel.getText().equals(acr.getString(acr.I_TOPIC))) {
      type = ObjAdminEvent.TOPIC;
      tempObj = (AdministeredObject)new com.sun.messaging.Topic();
  }

  /*
   * Object Properties (dest name, ...);
   */
  int i = 0;
  Properties props = tempObj.getConfiguration();
  for (Enumeration e = tempObj.enumeratePropertyNames();
        e.hasMoreElements(); i++) {
      String propName = (String)e.nextElement();
      String value = textItems[i].getText();
      value = value.trim();

View Full Code Here

  //
  // Create a temp object and set its default values in the
  // text fields.
  //
  AdministeredObject adminObj = (AdministeredObject)object;
  Properties props = adminObj.getConfiguration();
  int i = 0;
  for (Enumeration e = adminObj.enumeratePropertyNames();
          e.hasMoreElements(); i++) {
      String propName = (String)e.nextElement();
      try {
          textItems[i].setText(adminObj.getProperty(propName));
      } catch (Exception ex) {
          textItems[i].setText("");
      }
  }
  //
  // Set Read-only field.
  //
  if (adminObj.isReadOnly())
      checkBox.setSelected(true);
  else
      checkBox.setSelected(false);
 
  /*
 
View Full Code Here

TOP

Related Classes of com.sun.messaging.AdministeredObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.