Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 26 18:23
    Xerxekyran commented #2512
  • Jan 26 10:13
    Xerxekyran synchronize #2512
  • Jan 26 10:07
    Xerxekyran synchronize #2512
  • Jan 26 10:03
    Xerxekyran synchronize #2512
  • Jan 26 09:55
    Xerxekyran synchronize #2512
  • Jan 26 09:52
    Xerxekyran synchronize #2512
  • Jan 26 09:46
    Xerxekyran synchronize #2512
  • Jan 26 09:25
    Xerxekyran commented #2505
  • Jan 26 09:23
    Xerxekyran opened #2512
  • Jan 24 12:05
    jknack closed #2510
  • Jan 24 12:05

    jknack on 2.x

    assets: don't allow to create a… (compare)

  • Jan 24 00:23
    dependabot[bot] labeled #2511
  • Jan 24 00:23
    dependabot[bot] labeled #2511
  • Jan 24 00:23
    dependabot[bot] opened #2511
  • Jan 24 00:23

    dependabot[bot] on npm_and_yarn

    Bump swagger-ui-dist from 4.1.3… (compare)

  • Jan 23 16:39
    jknack edited #2510
  • Jan 23 16:38
    jknack edited #2510
  • Jan 23 16:37
    jknack labeled #2510
  • Jan 23 16:37
    jknack unlabeled #2510
  • Jan 23 16:26
    jknack commented #2507
Edgar Espina
@jknack
don’t follow
Mészáros István
@imeszaros
if I understood there would jooby-netty and jooby-netty-https in the future?
Edgar Espina
@jknack
yea
Mészáros István
@imeszaros
then what happens if I would like to turn https on in the conf file but have no '-https' on classpath?
Edgar Espina
@jknack
nothing or error
if user add the dependency we should configure https
have a look at this discussion: jooby-project/jooby#2074
Mészáros István
@imeszaros
okay
Edgar Espina
@jknack
is like the conf file will be irrelevant
Mészáros István
@imeszaros
and for http2 .. would that be also an implementation provider for io.jooby.Server
because then what if someone wants both https and http2?
Edgar Espina
@jknack
should be a pluggable system
no custom Server implementation
Mészáros István
@imeszaros
cool
that makes it clear
let me know if I can assist at any point
Edgar Espina
@jknack
cool
Edgar Espina
@jknack
Nguyen Huu Tuan
@snowyukischnee
hi, how can i using jooby hibernate with multiple datasource?
Edgar Espina
@jknack
multiple hibernate instances?
{
   install(new HibernateModule(“db.first"));
   install(new HibernateModule(“db.second"));
}
The keys db.first and db.second must be configuration prooperties
then you can request or inject one or the other by:
require(EntityManager.class, “db.first”);
or inject:
@Inject
public MyRepo(@Named(“db.first”) EntityManager em)
Edgar Espina
@jknack
@reddierocket https://github.com/jooby-project/jooby/pull/2078/files will be available in next release
Nguyen Huu Tuan
@snowyukischnee
@jknack i've done configure hibernate with multiple datasources.
however the @Inject seems not work when I inject EntityManager into mvc router
Edgar Espina
@jknack
what is the error?
Nguyen Huu Tuan
@snowyukischnee
it throws NPE
Nguyen Huu Tuan
@snowyukischnee
oh i forgot
Edgar Espina
@jknack
you need two
one for each datasourcce
decorator(new TransactionalRequest(“db.first"));
Nguyen Huu Tuan
@snowyukischnee
How can I inject some class instance using GuiceModule?
Edgar Espina
@jknack
Hmm?
Nguyen Huu Tuan
@snowyukischnee
I've created a class which extends AbstractModule and put it in
install(new GuiceModule(new MyModule()))
class MyModule {
  configure() {
    bind(Repo.class).to(Impl.class);
  }
}
and I'm inject Repo.class into the mvc router, and it also throws NPE
Edgar Espina
@jknack
show me the controller
it should works that is plain Guice
Nguyen Huu Tuan
@snowyukischnee
class Router {
  @Inject
  Repo repo;

  @Path("test")
  @GET 
  String test() {
    repo.save(new TestObj());
    return "Hello";
  }
}
Edgar Espina
@jknack
show me your App where did you add the Router
Nguyen Huu Tuan
@snowyukischnee
class Repo {
  @Inject
  @Named("db.first")
  EntityManager em;

  public void save(TestObj obj) {
    em.persist(obj);
  }
}
Edgar Espina
@jknack
show me your App where did you add the Router
Nguyen Huu Tuan
@snowyukischnee
{
  mount(new RouterDef());
}
class RouterDef extends Jooby {
  {
    mvc(new Router());
  }
}
Edgar Espina
@jknack
That is wrong
Nguyen Huu Tuan
@snowyukischnee
what should i do?
Edgar Espina
@jknack
class RouterDef extends Jooby {
  {
    mvc(Router.class);
  }
}