Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.ejb3;
 /*    */ 
 /*    */ import java.util.Collection;
 /*    */ import org.jboss.logging.Logger;
 /*    */ 
 /*    */ public class PersistenceUnitRegistry
 /*    */ {
/* 35 */   private static final Logger log = Logger.getLogger(PersistenceUnitRegistry.class);
/*    */ 
/*    */ 
/*    */   public static void register(PersistenceUnitDeployment container)
/*    */   {
/* 41 */     if (.contains(container.getKernelName())) throw new RuntimeException("Persistence Unit is already registered: " + container.getKernelName());
/* 42 */     .put(container.getKernelName(), container);
/*    */   }
/*    */ 
/*    */   public static void unregister(PersistenceUnitDeployment container)
/*    */   {
/* 47 */     .remove(container.getKernelName());
/*    */   }
/*    */ 
/*    */   public static PersistenceUnitDeployment getPersistenceUnit(String kernelName)
/*    */   {
/* 52 */     return (PersistenceUnitDeployment).get(kernelName);
/*    */   }
/*    */ 
/*    */   public static Collection<PersistenceUnitDeploymentgetPersistenceUnits()
/*    */   {
/* 57 */     return .values();
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.ejb3.PersistenceUnitRegistry
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X