1 package net.walend.somnifugi; 2 3 import java.util.Hashtable ; 4 import javax.naming.Context ; 5 import javax.naming.spi.InitialContextFactory ; 6 7 32 33 public class SomniQueueContextFactory 34 implements InitialContextFactory 35 { 36 public SomniQueueContextFactory() 37 { 38 } 39 @SuppressWarnings ("unchecked") 40 public Context getInitialContext(Hashtable <?,?> environment) 41 { 42 String contextName = (String )environment.get(SomniProperties.QUEUECONTEXTNAMEKEY); 43 44 if(contextName==null) 45 { 46 contextName = SomniProperties.QUEUEDEFAULTCONTEXTNAME; 47 } 48 49 return new SomniQueueContext(contextName,(Hashtable <Object ,Object >)environment); 50 } 51 } 52 53 75 | Popular Tags |