CPD Results

The following document contains the results of PMD's CPD 5.3.2.

Duplications

File Line
org/myorg/encconfig/ejb/ENCAuditorEJB.java 17
org/myorg/encconfig/ejb/LookupAuditorEJB.java 18
	private static final Logger log = LoggerFactory.getLogger(ENCAuditorEJB.class);
	//TODO: enc-config 12: define a resource value ENC injection
	//@Resource(name="val/publishJMS")
	private Boolean publishJMS;
	
	//TODO: enc-config 13: define a persistence context ENC injection
	//@PersistenceContext(name="jpa/em")
	private EntityManager em;
	
	//TODO: enc-config 14: define a resource-env ENC injection
	//@Resource(name="jms/topic")
	private Topic topic;

	//TODO: enc-config 15: define a resource ENC injection
	//@Resource(name="jms/cf")
	private ConnectionFactory cf;
	
	//TODO: enc-config 16: activate this method after injection
	//@PostConstruct
	public void init() {
		super.setLog(log);
		super.setConnectionFactory(cf);
		super.setEntityManager(em);
		super.setTopic(topic);
		super.setPublishJMS(isPublishJMS());
	}	
	
	@Override
	public boolean isPublishJMS() {
		return publishJMS!=null && publishJMS;
	}
	@Override
	public boolean havePersistenceContext() {
		return em!=null;
	}
	@Override
	public boolean haveTopic() {
		return topic!=null;
	}
	@Override
	public boolean haveConnectionFactory() {
		return cf!=null;
	}
	
	@Override
	public int audit(String message) {
		return super.audit(message);
	}
}
File Line
org/myorg/encconfig/ejb/ENCAuditorEJB.java 36
org/myorg/encconfig/ejb/LookupAuditorEJB.java 37
org/myorg/encconfig/ejb/XMLInjectAuditorEJB.java 19
	public void init() {
		super.setLog(log);
		super.setConnectionFactory(cf);
		super.setEntityManager(em);
		super.setTopic(topic);
		super.setPublishJMS(isPublishJMS());
	}	
	
	@Override
	public boolean isPublishJMS() {
		return publishJMS!=null && publishJMS;
	}
	@Override
	public boolean havePersistenceContext() {
		return em!=null;
	}
	@Override
	public boolean haveTopic() {
		return topic!=null;
	}
	@Override
	public boolean haveConnectionFactory() {
		return cf!=null;
	}
	
	@Override
	public int audit(String message) {
		return super.audit(message);
	}
}
File Line
org/myorg/encconfig/ejb/ENCAuditorEJB.java 37
org/myorg/encconfig/ejb/JNDIAuditorEJB.java 48
org/myorg/encconfig/ejb/LookupAuditorEJB.java 38
org/myorg/encconfig/ejb/XMLInjectAuditorEJB.java 20
		super.setLog(log);
		super.setConnectionFactory(cf);
		super.setEntityManager(em);
		super.setTopic(topic);
		super.setPublishJMS(isPublishJMS());
	}	
	
	@Override
	public boolean isPublishJMS() {
		return publishJMS!=null && publishJMS;
	}
	@Override
	public boolean havePersistenceContext() {
		return em!=null;
	}
	@Override
	public boolean haveTopic() {
		return topic!=null;
	}
	@Override
	public boolean haveConnectionFactory() {
		return cf!=null;
	}
	
	@Override
	public int audit(String message) {
		return super.audit(message);
	}
}