I have a web service with endpoint something like -endpoint.url.of.the.service:8080/Games/getAllGames/2
@Path(value = "/getGameById/{casinoId}/{envId}/{gameId}")
@Produces(MediaType.APPLICATION_JSON)public Game getGameById(@PathParam(value = "envId") int envId) {/** I have to decide HERE which environment to select! How to do it?**/DaoManager daoManager = new DaoManager(sessionFactory);return daoManager.getAllGames();}
}
----
You received this message because you are subscribed to a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/-KJenChwXGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwizard-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Ankit Chaudhari.
There are many ways to move ahead , but only ONE WAY to stand still..
http://www.ankitjc.info
You received this message because you are subscribed to the Google Groups "dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
my yml is having db details for each instance:
yml:-
database01: //details of db01
database01: // details of db02
config class similar to bwlo config..
public class confxyz extends Configuration {
@JsonProperty("db01")
@NotNull
private DataSourceFactory dataSource01;
@JsonProperty("db02")
@NotNull
private DataSourceFactory dataSource02;
public DataSourceFactory getDataSource01(){
return dataSource01;
}
public DataSourceFactory getDataSource02(){
return dataSource02;
}
}
in the Service class I was using the below code snippet.
DBI jdbi = getdbinstace01(env, confxyz ); // db01 instance
final dap daodb01 = jdbi.onDemand(dao01.class);
jdbi = getdbinstance02(env, confxyz ); //db02 instance
final IJCEMCDao daodb02 = jdbi.onDemand(da002.class);
ABC class abc = new ABCResource(daodb01,daodb02);
environment.jersey().register(abc);
When I use the above code snippet I am Facing issue that Postgres instance is already exists while loading the second dbinstance(db02) getting the below issue.
Caused by: MultiException[java.lang.IllegalArgumentException: A metric named io.dropwizard.db.ManagedPooledDataSource.postgresql.active already exists, java.util.concurrent.RejectedExecutionException: org.eclipse.jetty.util.thread.NonBlockingThread@41b52633]
at org.eclipse.jetty.server.Server.doStart(Server.java:329)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68
--
You received this message because you are subscribed to a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/-KJenChwXGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwizard-us...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-us...@googlegroups.com.