Skip to content

Commit

Permalink
Introduced dummy enum - used when lookup of PersistenceContextType fails
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2115 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
peteroyle committed Mar 19, 2009
1 parent 67ac4c1 commit 39eae1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Expand Up @@ -39,7 +39,11 @@ public EJBApiAbstraction(ResourceLoader resourceLoader)
EJB_ANNOTATION_CLASS = annotationTypeForName("javax.ejb.EJB");
RESOURCE_ANNOTATION_CLASS = annotationTypeForName("javax.annotation.Resource");
PERSISTENCE_CONTEXT_TYPE_CLASS = classForName("javax.persistence.PersistenceContextType");
EXTENDED_PERSISTENCE_CONTEXT_ENUM_VALUE = enumValue(PERSISTENCE_CONTEXT_TYPE_CLASS, "EXTENDED");
if (PERSISTENCE_CONTEXT_TYPE_CLASS.getClass().equals( Dummy.class)) {
EXTENDED_PERSISTENCE_CONTEXT_ENUM_VALUE = enumValue(PERSISTENCE_CONTEXT_TYPE_CLASS, "EXTENDED");
} else {
EXTENDED_PERSISTENCE_CONTEXT_ENUM_VALUE = DummyEnum.DUMMY_VALUE;
}
}

public final Class<?> PERSISTENCE_CONTEXT_TYPE_CLASS;
Expand Down
Expand Up @@ -50,8 +50,15 @@ public class ApiAbstraction
public interface Dummy
{
}


/**
* "Not found" enumeration value.
*/
public enum DummyEnum
{
DUMMY_VALUE
}

/**
* Constructor
*
Expand Down

0 comments on commit 39eae1a

Please sign in to comment.