Package org.xmlBlaster.engine

Examples of org.xmlBlaster.engine.ServerScope


* @see <a href="http://www.xmlBlaster.org/xmlBlaster/doc/requirements/mime.plugin.access.xpath.html">The mime.plugin.access.xpath requirement</a>
*/
public class XPathTransformerTest extends XMLTestCase {

   public void testXpathQos() throws Exception {
      ServerScope scope = new ServerScope();
      Global glob = scope;
      XPathFilter filter = new XPathFilter();
      filter.initialize(scope);
      String content = "SomethingFancy";
      String queryStr = "/qos";
View Full Code Here


         assertFalse(queryStr + " shouldn't match", ret);
      }
   }

   public void testXsltTransformation() throws Exception {
      ServerScope scope = new ServerScope();
      Global glob = scope;
      XPathFilter filter = new XPathFilter();
      filter.initialize(scope);
      String content = "<a><b/></a>";
      String xslFile = "test.xsl";
View Full Code Here

      return "Configuration of '" + getId() + "' is destroyed.\nPlease also change your configuration file to survive xmlBlaster restart";
   }
  
   public void shutdown() {
      Object mbean = this.mbeanHandle;
      ServerScope sc = this.serverScope;
      if (sc != null && mbean != null) {
         this.mbeanHandle = null;
         sc.unregisterMBean(mbean);
      }
      clusterNode.removeNodeMasterInfo(this);
   }
View Full Code Here

   // java -Xms18M -Xmx1064M org.xmlBlaster.contrib.dbupdate.OneToThree
   // -cluster.node.id heron -interactive false
   public static void main(String[] args) {
      OneToThree ott = null;
      try {
         ott = new OneToThree(new ServerScope(args), new ServerScope(args), new Global(args), new Global(args));
         ott.createReportFile();
         ott.wipeOutThree();
         ott.transformServerScope();
         ott.transformClientSide();
         ott.closeReportFile();
View Full Code Here

      return "Configuration of '" + getId() + "' is destroyed.\nPlease also change your configuration file to survive xmlBlaster restart";
   }
  
   public void shutdown() {
      Object mbean = this.mbeanHandle;
      ServerScope serverScope = this.fatherGlob;
      if (serverScope != null && mbean != null) {
         this.mbeanHandle = null;
         serverScope.unregisterMBean(mbean);
      }
     
      NodeMasterInfo[] nodeMasterInfos = getNodeMasterInfos();
      for (int i=0; i<nodeMasterInfos.length; i++) {
         nodeMasterInfos[i].shutdown();
View Full Code Here

    * <p>
    * java.io.Serialized file 'TopicEntry.ser' size=1407 bytes versus XML dump=123 bytes
    * </p>
    */
   public static void main(String[] args) {
      ServerScope glob = new ServerScope(args);
      String fileName = "TopicEntry.ser";
      try {
         org.xmlBlaster.client.key.PublishKey publishKey = new org.xmlBlaster.client.key.PublishKey(glob, "HA");
         org.xmlBlaster.engine.qos.PublishQosServer publishQosServer = new org.xmlBlaster.engine.qos.PublishQosServer(glob, "<qos><persistent/></qos>");
         publishQosServer.getData().setPriority(PriorityEnum.HIGH_PRIORITY);
View Full Code Here

    * <pre>
    * java org.xmlBlaster.engine.queuemsg.ServerEntryFactory
    * </pre>
    */
   public static void main(String[] args) {
      ServerScope glob = new ServerScope(args);

      try {
         String[] persistType = new String[] { ENTRY_TYPE_MSG_SERIAL, ENTRY_TYPE_MSG_XML };

         int numRuns = 4;
         for(int ii=0; ii<numRuns; ii++) {
            for(int jj=0; jj<persistType.length; jj++) {
               PublishKey publishKey = new PublishKey(glob, "HA");
               PublishQosServer publishQosServer = new PublishQosServer(glob, "<qos><persistent/></qos>");
               publishQosServer.getData().setPriority(PriorityEnum.HIGH_PRIORITY);
               MsgUnit msgUnit = new MsgUnit(publishKey.getData(), "HO".getBytes(), publishQosServer.getData());
               StorageId storageId = new StorageId(glob, "heron", "mystore", "someid");
               MsgUnitWrapper msgUnitWrapper = new MsgUnitWrapper(glob, msgUnit, null, storageId, 0, 0, persistType[jj], -1);
               msgUnitWrapper.startExpiryTimer();
               I_EntryFactory factory = glob.getEntryFactory();

               int priority = msgUnitWrapper.getPriority();
               long timestamp = msgUnitWrapper.getUniqueId();
               String type = msgUnitWrapper.getEmbeddedType();
               boolean persistent = msgUnitWrapper.isPersistent();
View Full Code Here

    *
    * @param args -inFile [fileName.xml] OR -xml [the xml string]
    */
   public static void main(String[] args) {
      try {
         ServerScope scope = new ServerScope(args);
         Global glob = scope;
         XPathFilter filter = new XPathFilter();
         filter.initialize(scope);
         // check -matchAgainstQos and -xslContentTransformFileName command line settings
         String xslFile = Args.getArg(args, "-"+XSL_CONTENT_TRANSFORMER_FILE_NAME, (String)null);
View Full Code Here


   /** For testing with JUnit: java org.xmlBlaster.test.cluster.NodeParserTest */
   public static void main(String[] args)
   {
      ServerScope glob = new ServerScope(args);
      glob.setUseCluster(true);
      ClusterManager m = new ClusterManager(glob, null);

      try {
         m.init(glob, null);

         String xml =
            "<clusternode id='heron.mycomp.com'>" +
            "   <master type='DomainToMaster' version='0.9'>\n" +
            "     <key queryType='DOMAIN' domain='RUGBY'/>\n" +
            "     <key queryType='XPATH'>//STOCK</key>\n" +
            "     <filter type='ContentLength'>\n" +
            "       8000\n" +
            "     </filter>\n" +
            "     <filter type='ContainsChecker' version='7.1' xy='true'>\n" +
            "       bug\n" +
            "     </filter>\n" +
            "     <someOtherPluginfilter>\n" +
            "        <![CDATA[\n" +
            "        ]]>\n" +
            "     </someOtherPluginfilter>\n" +
            "   </master>\n" +
            "</clusternode>\n";

         {
            System.out.println("\nmaster message from client ...");
            NodeParser nodeParser = new NodeParser(glob, new ClusterNode(glob, new NodeId("heron.mycomp.com"), null), xml);
            System.out.println(nodeParser.getClusterNode().toXml());
         }

         xml =
            "<clusternode id='heron.mycomp.com'>\n" +
            "   <master stratum='1' refid='frodo' type='DomainPlugin' version='2.0' acceptDefault='false' acceptOtherDefault='true'>\n" +
            "     My own rule\n" +
            "   </master>\n" +
            "   <state>\n" +
            "     <cpu id='0' idle='60'/>\n" +
            "     <cpu id='1' idle='58'/>\n" +
            "     <ram free='10657'/>\n" +
            "   </state>\n" +
            "</clusternode>\n";


         {
            System.out.println("\nFull Message from client ...");
            NodeParser nodeParser = new NodeParser(glob, glob.getClusterManager(), xml, null);
            System.out.println(nodeParser.getClusterNode().toXml());
         }
      }
      catch(Throwable e) {
         e.printStackTrace();
View Full Code Here

    * <pre>
    *  java org.xmlBlaster.test.classtest.queue.EntrySize
    * </pre>
    */
   public static void main(String args[]) {
      ServerScope glob = new ServerScope(args);
      new EntrySize(glob);
      //   long startTime = System.currentTimeMillis();
      //   long usedTime = System.currentTimeMillis() - startTime;
      //   testSub.log.info("time used for tests: " + usedTime/1000 + " seconds");
   }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.engine.ServerScope

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.