PersistenceContextAnnFactory.java 文件源码

java
阅读 123 收藏 0 点赞 0 评论 0

项目:tomee 作者:
public PersistenceContextAnn create(final PersistenceContext persistenceContext, final AnnotationDeployer.Member member) throws OpenEJBException {
    if (useAsm) {
        if (member != null) {
            addAnnotations(member.getDeclaringClass());
        }

        String name = persistenceContext.name();
        if (name == null || name.equals("")) {
            name = member == null ? null : member.getDeclaringClass().getName() + "/" + member.getName();
        }

        final AsmPersistenceContext asmPersistenceContext = contexts.get(name);
        if (asmPersistenceContext == null) {
            throw new NullPointerException("PersistenceContext " + name + " not found");
        }
        return asmPersistenceContext;
    } else {
        return new DirectPersistenceContext(persistenceContext);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号