Examples of lookup()


Examples of org.apache.naming.resources.FileDirContext.lookup()

                    }
                } else if ("file".equals(url.getProtocol())) {
                    FileDirContext fileDirContext = new FileDirContext();
                    fileDirContext.setDocBase(new File(url.toURI()).getAbsolutePath());
                    try {
                        fileDirContext.lookup("META-INF/resources/");
                        //lookup succeeded
                        if(context instanceof StandardContext){
                            ((StandardContext)context).addResourcesDirContext(fileDirContext);
                        }
                    } catch (NamingException e) {

Examples of org.apache.neethi.PolicyRegistry.lookup()

   
    Policy resolveLocal(PolicyReference ref, final Bus bus, DescriptionInfo i) {
        String uri = ref.getURI().substring(1);
        String absoluteURI = i == null ? uri : i.getBaseURI() + uri;
        PolicyRegistry registry = bus.getExtension(PolicyEngine.class).getRegistry();
        Policy resolved = registry.lookup(absoluteURI);
        if (null != resolved) {
            return resolved;
        }
        ReferenceResolver resolver = new ReferenceResolver() {
            public Policy resolveReference(String uri) {

Examples of org.apache.neethi.PolicyRegistryImpl.lookup()

        Collection<PolicyComponent> policyElements = des.getPolicySubject().getAttachedPolicyComponents();
        PolicyRegistry registry = new PolicyRegistryImpl();

        Object policyComponent;

        Policy policy = registry.lookup(id);

        if (policy != null) {
            return policy;
        }

Examples of org.apache.ojb.broker.cache.ObjectCache.lookup()

                            _pb.store(entry.cacheObject);
                        }
                        else
                        {
                            // PB migth already created the object by auto-update
                            if (cache.lookup(oid) == null) {
                                _pb.store(entry.cacheObject, state);
                            }
                        }

                    }

Examples of org.apache.openejb.core.ivm.naming.IvmContext.lookup()

    @Test
    public void unbind() throws NamingException {
        final IvmContext context = new IvmContext();
        context.bind("global/foo/Bar", "Bar");

        assertEquals("Bar", context.lookup("global/foo/Bar"));

        context.unbind("global/foo/Bar");

        try {
            context.lookup("global/foo/Bar");

Examples of org.apache.poi.ddf.EscherOptRecord.lookup()

        case ST_PICTUREFRAME:
          // Duplicated from
          // org.apache.poi.hslf.model.Picture.getPictureIndex()
          EscherOptRecord opt = (EscherOptRecord) getEscherChild(
              shapeContainer, EscherOptRecord.RECORD_ID );
          EscherSimpleProperty prop = (EscherSimpleProperty)opt.lookup(
              EscherProperties.BLIP__BLIPTODISPLAY );
          if (prop == null)
          {
            log.log( POILogger.WARN,
                "Picture index for picture shape not found." );

Examples of org.apache.poi.ddf.EscherTertiaryOptRecord.lookup()

                EscherTertiaryOptRecord escherTertiaryOptRecord = shapeDescription
                        .getChildById( EscherTertiaryOptRecord.RECORD_ID );
                if ( escherTertiaryOptRecord == null )
                    return defaultValue;

                EscherSimpleProperty escherProperty = escherTertiaryOptRecord
                        .lookup( propertyId );
                if ( escherProperty == null )
                    return defaultValue;
                int value = escherProperty.getPropertyValue();

Examples of org.apache.synapse.registry.Registry.lookup()

        Properties props = new Properties();
        props.put("root", "file:./");
        props.put("cachableDuration", "1500");
        reg.init(props);
       
        OMNode node = reg.lookup(FILE2);
        node.serialize(new NullOutputStream());
    }

    public void testXPathEvaluationOnRegistryResource() throws Exception {
        SimpleURLRegistry registry = new SimpleURLRegistry();

Examples of org.apache.turbine.services.avaloncomponent.AvalonComponentService.lookup()

            (AvalonComponentService) TurbineServices.getInstance().getService(
                    AvalonComponentService.SERVICE_NAME);

        assertNotNull(avalonComponentService);

        GlobalCacheService dgcs = (GlobalCacheService)avalonComponentService.lookup(GlobalCacheService.ROLE);
        assertNotNull(dgcs);
        CryptoService cs = (CryptoService)avalonComponentService.lookup(CryptoService.ROLE);
        assertNotNull(cs);
        LocalizationService ls = (LocalizationService)avalonComponentService.lookup(LocalizationService.ROLE);
        assertNotNull(ls);

Examples of org.apache.tuscany.sca.host.corba.jee.JEECorbaHost.lookup()

            TestInterfaceServant servant = new TestInterfaceServant();
            innerHost.registerServant(uri1, servant);
            innerHost.registerServant(uri2, servant);
            innerHost.stop();
            try {
                innerHost.lookup(uri1);
                fail();
            } catch (CorbaHostException e) {
                assertEquals(CorbaHostException.NO_SUCH_OBJECT, e.getMessage());
            }
            try {
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.