protected Properties properties;
protected EntityManager em;
protected String issuer;
+ protected boolean shutdown = false;
public StdOnapPip() {
super();
}
@Override
- public void configure(String id, Properties properties) throws PIPException {
+ public synchronized void configure(String id, Properties properties) throws PIPException {
+ //
+ // This most likely will never get called since configure is called
+ // upon startup.
+ //
+ if (this.shutdown) {
+ throw new PIPException("Engine is shutdown.");
+ }
super.configure(id, properties);
logger.info("Configuring historyDb PIP {}", properties);
this.properties = properties;
}
}
+ @Override
+ public synchronized void shutdown() {
+ if (this.em != null) {
+ this.em.close();
+ this.em = null;
+ }
+ this.shutdown = true;
+ }
+
protected String getAttribute(PIPFinder pipFinder, PIPRequest pipRequest) {
//
// Get the actor value