The version of Apache log4j used by SoundHelix.

[[ 🗃 ^aEp6o apache-log4j ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/aEp6o

SSH: git clone USERNAME@vervis.peers.community:aEp6o

Branches

Tags

v1_3alpha_1 :: tests / webapps / Util / src / java / wombat /

Util.java


package wombat;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class Util {

 static public String foo(String name) {
   System.out.println("Util.foo() called");

   Context ctx = null;

    try {
      Initial ictx = new InitialContext();
      System.out.println("ctx type is "+ctx);
      return (String) lookup(ctx, name);      
    } catch (NamingException ne) {
      ne.printStackTrace();
      return null;
    }

 }


  static public String lookup(Context ctx, String name) {
    if(ctx == null) {
      return null;
    }
    try {
      return (String) ctx.lookup(name);
    } catch (NamingException ne) {
      System.out.println("Could not find ["+name+"]");
      ne.printStackTrace();
      return null;
    }
  }
}

[See repo JSON]