use of com.example.helloworld.db.hibernate.FortuneHibernateImpl in project FrameworkBenchmarks by TechEmpower.
the class HelloWorldService method run.
@Override
public void run(HelloWorldConfiguration config, Environment environment) throws UnknownHostException {
if ("com.mysql.cj.jdbc.Driver".equals(config.getDatabaseConfiguration().getDriverClass())) {
// register below for default dropwizard test only
// Test type 1: JSON serialization
environment.jersey().register(new JsonResource());
// Test type 6: Plaintext
environment.jersey().register(new TextResource());
}
// Test types 2, 3 & 5: Single database query, Multiple database queries & Database updates
environment.jersey().register(new WorldResource(new WorldHibernateImpl(hibernate.getSessionFactory())));
// Test type 4: Fortunes
environment.jersey().register(new FortuneResource(new FortuneHibernateImpl(hibernate.getSessionFactory())));
}
Aggregations