Examples of MapBuilder


Examples of org.apache.torque.map.MapBuilder

    public MapBuilder getMapBuilder(String className)
        throws TorqueException
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilderCache.get(className);

            if (mb == null)
            {
                mb = (MapBuilder) Class.forName(className).newInstance();
                // Cache the MapBuilder before it is built.
                mapBuilderCache.put(className, mb);
            }

            if (mb.isBuilt())
            {
                return mb;
            }

            try
            {
                mb.doBuild();
            }
            catch (Exception e)
            {
                // remove the MapBuilder from the cache if it can't be built correctly
                mapBuilderCache.remove(className);
View Full Code Here

Examples of org.apache.turbine.util.db.map.MapBuilder

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.turbine.util.db.map.MapBuilder

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.turbine.util.db.map.MapBuilder

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }

            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.turbine.util.db.map.MapBuilder

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized(mapBuilders)
                {
                   mb = (MapBuilder)mapBuilders.get(name);
                   if (mb == null)
                  {           
                      mb = (MapBuilder)Class.forName(name).newInstance();
                      // Cache the MapBuilder before it is built.
                      mapBuilders.put(name, mb);
                  }
               }
            }
           
            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized(mb)
            {
               if (!mb.isBuilt())
               {
                  try
                  {
                     mb.doBuild();
                  }
                  catch ( Exception e )
                  {
                      // need to think about whether we'd want to remove
                      //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.codemap.resources.MapBuilder

    }

    @Override
    protected Configuration computeValue(ProgressMonitor monitor, Arguments args) {
        LatentSemanticIndex index = args.nextOrFail();
        return previousConfiguration = new MapBuilder().addCorpus(index).makeMap(previousConfiguration);
    }
View Full Code Here

Examples of org.jboss.internal.soa.esb.webservice.addressing.MAPBuilder

      return (replyTo != null ? new CXFMAPEndpoint(replyTo) : null);
   }

   public MAPRelatesTo getRelatesTo()
   {
      MAPBuilder builder = CXFMAPBuilder.getBuilder();
      RelatesToType relatesTo = implementation.getRelatesTo();
      if (relatesTo != null)
      {
         String type = relatesTo.getRelationshipType();
         int index = type.indexOf("}");
         String ns = type.substring(1, index + 1);
         String name = type.substring(index + 1);
         return builder.newRelatesTo(relatesTo.getValue(), new QName(ns, name));
      }
      else
      {
         return null;
      }
View Full Code Here

Examples of org.jboss.internal.soa.esb.webservice.addressing.MAPBuilder

    */
   private void setClientID(String action)
   {
      BindingProvider bindingProvider = (BindingProvider)port;
      Map<String, Object> msgContext = bindingProvider.getRequestContext();
      MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
      MAPConstants ADDR = builder.newConstants();
      MAP outProps = builder.newMap();
      outProps.setTo("uri:jaxrpc-samples-wsaddressing/TestService");
      outProps.setMessageID("urn:uuid:" + UUIDGenerator.generateRandomUUIDString());
      outProps.setAction("http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/" + action);

      MAPEndpoint replyTo = builder.newEndpoint(ADDR.getAnonymousURI());
      outProps.setReplyTo(replyTo);

      // Assign a new clientid
      if (clientID == null)
      {
View Full Code Here

Examples of org.jboss.internal.soa.esb.webservice.addressing.MAPBuilder

   @SuppressWarnings("unchecked")
   private void readClientID()
   {
      BindingProvider bindingProvider = (BindingProvider)port;
      Map<String, Object> msgContext = bindingProvider.getResponseContext();
      MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
      MAP addrProps = builder.inboundMap(msgContext);
      if (addrProps == null)
         return; //throw new IllegalStateException("Cannot obtain AddressingProperties");
      for (Object obj : addrProps.getReferenceParameters())
      {
         if (obj instanceof Element) //Native always uses Element for ref params
View Full Code Here

Examples of org.jboss.internal.soa.esb.webservice.addressing.MAPBuilder

   @Override
   public boolean handleInbound(MessageContext msgContext)
   {
      log.info("handleRequest");

      MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
      MAP addrProps = builder.inboundMap(msgContext);

      if (addrProps == null)
         throw new IllegalStateException("Cannot obtain AddressingProperties");

      String clientid = null;
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.