Package org.xmlBlaster.util.context

Examples of org.xmlBlaster.util.context.ContextNode


   public String getInstanceId() {
      if (this.instanceId == null) {
         synchronized(this) {
            if (this.instanceId == null) {
               // TODO: Two mirrored /node/heron: add IP:port to instanceId?
               ContextNode node = new ContextNode("instanceId", ""+System.currentTimeMillis(),
                                      getContextNode());
               this.instanceId = node.getAbsoluteName();
               //this.instanceId = getLogPrefix() + "/instanceId/" + System.currentTimeMillis();
            }
         }
      }
      return this.instanceId;
View Full Code Here


   public final void setId(String id) {
      super.setId(id);
      if (id == null) return;
      this.nodeId = new NodeId(id); // ContextNode should replace NodeId one day
      this.contextNode = new ContextNode(ContextNode.CLUSTER_MARKER_TAG, getStrippedId(), (ContextNode)null);
   }
View Full Code Here

    this.remoteAddr = req.getRemoteAddr();

        // JMX
      try {
           String instanceName = glob.validateJmxValue(this.sessionId);
           this.contextNode = new ContextNode("instance", instanceName, this.ajaxServlet.getContextNode());
           this.mbeanHandle = glob.registerMBean(this.contextNode, this);
        }
      catch (XmlBlasterException e) {
         log.warning("Ignoring problem during JMX session registration: " + e.toString());
      }
View Full Code Here

      if (id == null) return;
      this.id = id;
      if (getStrippedId() == null) return;
      if (this.contextNode == null) {
         String instanceName = validateJmxValue(getStrippedId());
         this.contextNode = new ContextNode(ContextNode.CLUSTER_MARKER_TAG, instanceName, ContextNode.ROOT_NODE);
      }
      else {
         this.contextNode.setInstanceName(getStrippedId());
      }
   }
View Full Code Here

      // We should not use a ctor for clones, but instead:
      //Global newObject = (Global)super.clone();
      // but our Global ctor uses counter++, so we nevertheless do it like this (breaking Object.clone javadoc that no ctor is called):
      Global g = new Global(Property.propsToArgs(this.property.getProperties()), false, false);
      if (this.contextNode != null) {
         g.setContextNode(new ContextNode(this.contextNode.getClassName(), this.contextNode.getInstanceName(), this.contextNode.getParent()));
      }
     
      if (isServerSide()) {
         g.addObjectEntry(Constants.OBJECT_ENTRY_ServerScope, this);
      }
View Full Code Here

    */
   public String getInstanceId() {
      if (this.instanceId == null) {
         synchronized(this) {
            if (this.instanceId == null) {
               ContextNode node = new ContextNode("instanceId", ""+System.currentTimeMillis(),
                                       getContextNode());
               this.instanceId = node.getAbsoluteName();
            }
         }
      }
      return this.instanceId;
   }
View Full Code Here

         if (xmlBlasterImpl == null) {
            throw new XmlBlasterException(this.glob, ErrorCode.INTERNAL_UNKNOWN, ME + ".init", "xmlBlasterImpl object is null");
         }

         // For JMX instanceName may not contain ","
         this.contextNode = new ContextNode(ContextNode.SERVICE_MARKER_TAG,
               "CorbaDriver[" + getType() + "]",
               glob.getContextNode());
         this.mbeanHandle = this.glob.registerMBean(this.contextNode, this);
         init(glob, new AddressServer(glob, getType(), glob.getId(), pluginInfo.getParameters()), this.authenticate, xmlBlasterImpl);
        
View Full Code Here

      if (engineGlob == null)
         throw new XmlBlasterException(this.glob, ErrorCode.INTERNAL_UNKNOWN, ME + ".init", "could not retreive the ServerNodeScope. Am I really on the server side ?");

      // For JMX instanceName may not contain ","
      String vers = ("1.0".equals(getVersion())) ? "" : getVersion();
      this.contextNode = new ContextNode(ContextNode.SERVICE_MARKER_TAG,
            "SocketDriver[" + getType() + vers + "]", glob.getContextNode());
      this.mbeanHandle = this.glob.registerMBean(this.contextNode, this);

      try {
         this.authenticate = engineGlob.getAuthenticate();
View Full Code Here

      org.xmlBlaster.engine.ServerScope engineGlob = (org.xmlBlaster.engine.ServerScope)glob.getObjectEntry(Constants.OBJECT_ENTRY_ServerScope);
      if (engineGlob == null)
         throw new XmlBlasterException(this.glob, ErrorCode.INTERNAL_UNKNOWN, ME + ".init", "could not retreive the ServerNodeScope. Am I really on the server side ?");

      // For JMX instanceName may not contain ","
      super.contextNode = new ContextNode(ContextNode.SERVICE_MARKER_TAG,
            "EmailDriver[" + getType() + "]",
            glob.getContextNode());
      super.mbeanHandle = this.glob.registerMBean(super.contextNode, this);
     
      engineGlob.getRequestBroker().getAuthenticate(null).addClientListener(this);
View Full Code Here

      super.setEmailSessionId(callbackAddress.getSecretSessionId());
     
      if (super.mbeanHandle == null) {
         String tmp = callbackAddress.getEnv("__ContextNode", (String)null).getValueString();
         if (tmp != null) {
            ContextNode parent = ContextNode.valueOf(tmp);
            // For JMX instanceName may not contain ","
            super.contextNode = new ContextNode(ContextNode.PROTOCOL_MARKER_TAG,
                  "CallbackEmailDriver", parent);
            super.mbeanHandle = this.glob.registerMBean(super.contextNode, this);
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.context.ContextNode

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.