esercizi webservices wsdl

This commit is contained in:
2015-06-29 00:45:45 +02:00
parent 620edb5049
commit 53c280b729
60 changed files with 1741 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
package exam;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.inject.Inject;
/**
* Created by Giovanni on 16/06/2015.
*/
@Singleton
@Startup
public class DatabaseInitializer {
@Inject
EJB e;
private CD first;
private CD second;
@PostConstruct
protected void initialize(){
first = new CD("001","Title1","Author1",35.0f);
e.createCD(first);
second = new CD("002","Title2","Author2",40.0f);
e.createCD(second);
}
@PreDestroy
protected void deleteall(){
e.removeCD(first);
e.removeCD(second);
}
}