Examples of lookup()


Examples of javax.naming.directory.DirContext.lookup()

            return;
        }

        boolean exists = true;
        try {
            resources.lookup(path);
        } catch (NamingException e) {
            exists = false;
        }

        boolean result = true;

Examples of javax.naming.directory.InitialDirContext.lookup()

        Attribute attr = new BasicAttribute( "userPassword", newUserPassword );
        attributes.put( attr );
        attr = new BasicAttribute( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT, newPrincipalName );
        attributes.put( attr );

        DirContext person = ( DirContext ) ctx.lookup( RDN );
        person.modifyAttributes( "", DirContext.REPLACE_ATTRIBUTE, attributes );

        // Read again from directory.
        person = ( DirContext ) ctx.lookup( RDN );

Examples of javax.naming.ldap.InitialLdapContext.lookup()

        InitialLdapContext initial = new InitialLdapContext( env, null );

        try
        {
            ctx = ( InitialLdapContext ) initial.lookup( "uid=admin" );
            fail( "should not get here due to exception cuz anonymous user is "
                    + "not allowed read access to the admin account entry" );
        }
        catch( LdapConfigurationException e )
        {

Examples of javax.naming.ldap.LdapContext.lookup()

        // delete success
        ctx.destroySubcontext( "ou=computers,uid=akarasulu,ou=users,ou=system" );

        try
        {
            ctx.lookup( "ou=computers,uid=akarasulu,ou=users,ou=system" );
            fail( "Should never get here." );
        }
        catch ( NameNotFoundException e )
        {
        }

Examples of javax.persistence.PersistenceContext.lookup()

        else if(field.isAnnotationPresent(Resource.class))
        {
            Resource resource = field.getAnnotation(Resource.class);           
            try
            {
                obj = context.lookup("java:/comp/env/"+ resource.name());
            }
            catch(Exception e)
            {
                logger.error("Unable to inject resource for :  " + resource );
            }            

Examples of javax.xml.ws.WebServiceRef.lookup()

        } else if ( annotatedField.isAnnotationPresent( EJB.class ) ) {
            EJB ejb = annotatedField.getAnnotation( EJB.class );
            lookupName = getJndiName(ejb.lookup(), ejb.mappedName(), ejb.name());
        } else if ( annotatedField.isAnnotationPresent( WebServiceRef.class ) ) {
            WebServiceRef webServiceRef = annotatedField.getAnnotation( WebServiceRef.class );
            lookupName = getJndiName(webServiceRef.lookup(), webServiceRef.mappedName(), webServiceRef.name());
        } else if ( annotatedField.isAnnotationPresent( PersistenceUnit.class ) ) {
            PersistenceUnit persistenceUnit = annotatedField.getAnnotation( PersistenceUnit.class );
            lookupName = getJndiName( persistenceUnit.unitName(), null, persistenceUnit.name() );
        } else if ( annotatedField.isAnnotationPresent( PersistenceContext.class ) ) {
            PersistenceContext persistenceContext = annotatedField.getAnnotation( PersistenceContext.class );

Examples of jodd.madvoc.ActionConfigSet.lookup()

    // 1st try: the map

    ActionConfigSet actionConfigSet = map.get(actionPath);
    if (actionConfigSet != null) {
      ActionConfig actionConfig = actionConfigSet.lookup(method);
      if (actionConfig != null) {
        return actionConfig;
      }
    }

Examples of jodd.madvoc.component.ActionsManager.lookup()

    ActionsManager actionsManager = madvoc.getWebApplication().getComponent(ActionsManager.class);

    assertEquals(2, actionsManager.getActionsCount());

    ActionConfig actionConfig = actionsManager.lookup("/hello", "GET");
    assertNotNull(actionConfig);
    assertEquals(BooAction.class, actionConfig.getActionClass());
    assertEquals("foo1", actionConfig.actionClassMethod.getName());

    actionConfig = actionsManager.lookup("/world", "GET");

Examples of jodd.typeconverter.TypeConverterManagerBean.lookup()

  public static void registerTypeConverter() {
    TypeConverterManagerBean typeConverterManagerBean = TypeConverterManager.getDefaultTypeConverterManager();

    typeConverterManagerBean.register(FileUpload.class, new FileUploadConverter());

    FileConverter fileConverter = (FileConverter) typeConverterManagerBean.lookup(File.class);

    fileConverter.registerAddonConverter(new FileUploadToFileTypeConverter());
  }
}

Examples of morfologik.stemming.DictionaryLookup.lookup()

    }

    for (final String word : sentenceTokens) {
      final List<AnalyzedToken> l = new ArrayList<>();
      final String lowerCaseWord = word.toLowerCase(RO_LOCALE);
      final List<WordData> taggerTokens = morfologik.lookup(lowerCaseWord);
      if (taggerTokens != null) {
        for (WordData wd : taggerTokens) {
          final String[] tagsArr = wd.getStem().toString().split("\\+");
          for (final String currTag : tagsArr) {
            l.add(new AnalyzedToken(word,
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.