Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.ahlner.Log4J2DB.beans
Class LogEventUtil  view LogEventUtil download LogEventUtil.java

java.lang.Object
  extended byorg.ahlner.Log4J2DB.beans.LogEventUtil

public class LogEventUtil
extends java.lang.Object

Utility class for LogEvent.


Field Summary
private static java.lang.String hexServerIP
          Cached per JVM server IP.
private static java.security.SecureRandom seeder
           
 
Constructor Summary
LogEventUtil()
           
 
Method Summary
static java.lang.String generateGUID(java.lang.Object o)
          A 32 byte GUID generator (Globally Unique ID).
static LogEventHome getHome()
          Obtain remote home interface from default initial context
static LogEventHome getHome(java.util.Hashtable environment)
          Obtain remote home interface from parameterised initial context
private static int getInt(byte[] bytes)
           
static LogEventLocalHome getLocalHome()
          Obtain local home interface from default initial context
private static java.lang.String hexFormat(int i, int j)
           
private static java.lang.String padHex(java.lang.String s, int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hexServerIP

private static java.lang.String hexServerIP
Cached per JVM server IP.


seeder

private static final java.security.SecureRandom seeder
Constructor Detail

LogEventUtil

public LogEventUtil()
Method Detail

getHome

public static LogEventHome getHome()
                            throws javax.naming.NamingException
Obtain remote home interface from default initial context


getHome

public static LogEventHome getHome(java.util.Hashtable environment)
                            throws javax.naming.NamingException
Obtain remote home interface from parameterised initial context


getLocalHome

public static LogEventLocalHome getLocalHome()
                                      throws javax.naming.NamingException
Obtain local home interface from default initial context


generateGUID

public static final java.lang.String generateGUID(java.lang.Object o)
A 32 byte GUID generator (Globally Unique ID). These artificial keys SHOULD NOT be seen by the user, not even touched by the DBA but with very rare exceptions, just manipulated by the database and the programs. Usage: Add an id field (type java.lang.String) to your EJB, and add setId(XXXUtil.generateGUID(this)); to the ejbCreate method.


getInt

private static int getInt(byte[] bytes)

hexFormat

private static java.lang.String hexFormat(int i,
                                          int j)

padHex

private static java.lang.String padHex(java.lang.String s,
                                       int i)