Package nexj.core.meta

Examples of nexj.core.meta.Metaclass.invoke()


               context.login(new SimplePrincipal(m_sUser));
               Logger.resetContext(nCookie);
               nCookie = Logger.pushContext(context.getPrincipal().getName());
            }

            upgrade.invoke("upgrade");
            context.getUnitOfWork().commit(false);
            context.setFragmentName(null);
         }

         context.complete(true);
View Full Code Here


            {
               Metaclass metaclass = m_context.getMetadata().findMetaclass(sClassName);
              
               if (metaclass != null && metaclass.getPersistenceMapping() != null)
               {
                  list = (InstanceList)metaclass.invoke("read",
                     new Object[]{null, new Pair(Symbol.EQ, new Pair(new Pair(Symbol.AT),
                        new Pair(OID.fromBinary(serializedOID)))), null, null, null, null});
               }
            }
View Full Code Here

         public void run(InvocationContext context) throws Throwable
         {
            context.setSecure(false);

            Metaclass dispatcherClass = m_metadata.getMetaclass("SysObjectQueueDispatcher");
            Instance dispatcher = (Instance)dispatcherClass.invoke("getDispatcher", new Object[]
            {
               Boolean.TRUE
            });

            m_sQueueName = (String)dispatcher.getValue("QUEUE_NAME");
View Full Code Here

            m_messageLoadAttributes = (Pair)dispatcher.getValue("SELECT_ATTRIBUTES", "LOAD_ATTRIBUTES");

            if (startNode(result, dispatcher, bReset, context))
            {
               s_logger.debug("This node selected to be dispatcher, recovering incomplete transactions");
               dispatcherClass.invoke("recover", new Object[]
               {
                  null
               });
            }
         }
View Full Code Here

                     Metaclass dispatcherClass = m_metadata.getMetaclass("SysObjectQueueDispatcher");

                     // verify that dispatcher remains the same
                     if (!sDispatcherId.equals(J2EEUtil.ISOLATED_NODE_NAME) &&
                        !sDispatcherId.equals(((Instance)((Instance)dispatcherClass.invoke("getDispatcher", new Object[]{Boolean.FALSE})).getValue("node")).getValue("name")))
                     {
                        throw new InvalidDispatcherException(sDispatcherId);
                     }

                     // dispatch in bulk
View Full Code Here

                     {
                        throw new InvalidDispatcherException(sDispatcherId);
                     }

                     // dispatch in bulk
                     Pair result = (Pair)dispatcherClass.invoke("dispatch", new Object[]{safety});
                     InstanceList deliverable = (InstanceList)result.getTail();

                     if (deliverable != null && !deliverable.isEmpty())
                     {
                        for (int i = 0; i < deliverable.size(); i++)
View Full Code Here

      boolean bSecured = context.isSecure();

      try
      {
         context.setSecure(false);
         dispatcherClass.invoke("clientComplete", new Object[] {msg});
      }
      finally
      {
         context.setSecure(bSecured);
      }
View Full Code Here

         }

         context.setSecure(false);

         // mark message as undeliverable.
         dispatcherClass.invoke("blacklist", new Object[]
         {
            msg
         });

         context.complete(true);
View Full Code Here

      Metaclass phoneClass = getMetadata().getMetaclass("Phone");
      Instance phone;
      ObjectInput in;
      TransferObject phoneRoot, contactRoot;

      phone = (Instance)phoneClass.invoke("new");
      phone.setValue("type", "cell");
      phone.setValue("number", "439-0000");

      // Parse reference to Contact (parsed as Object_Inherit_Contact)
      phone.setValue("contact", m_contact);
View Full Code Here

        
         // Create it
         assertNull(context.beginTransaction());
        
         Metaclass testFPA = metadata.getMetaclass("TestFPA");
         Instance a = (Instance)testFPA.invoke("new");
        
         a.setValue("data", new Binary("Creation (\u4e2d\u6587) data.".getBytes("utf-8")));
        
         // Replicate
         context.getUnitOfWork().addReplicationFragment(a, "fragment1");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.