Until Play 2.5 I used jongo + play-jongo to use MongoDB. With 2.5 which is the plugin I've to use to connect to Mongo?
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/cda0d599-022d-448f-bb20-390518677de8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It seems like it only works for 2.4 but there is an open issue for it.The migration for Play modules is not as much as it was in 2.4, so it should not be too difficult for library authors to update.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/cfd03cfb-f016-4732-b2e3-ea95fd3a7b03%40googlegroups.com.
Honestly, we would rather officially support fewer of those ORMs, just because having to update, maintain, and document them is a pretty significant burden on the Play team. The ideal is that we make it easy enough to integrate with Play that the library authors can easily update things without our help. Usually, if the library is well-maintained, it will be updated within a week or two of the release.For a lot of third-party libraries it's not difficult to integrate with Play yourself. Usually the only things you need to do are create a component to integrate with the application lifecycle and maybe create a few bindings for dependency injection.
It would be nice if this was documented somewhere, or an example on Github. Making a library DI aware is sometime a real challenge. And a "how to make it work nicely with Play" would be a nice thing to have.
It would be nice if this was documented somewhere, or an example on Github. Making a library DI aware is sometime a real challenge. And a "how to make it work nicely with Play" would be a nice thing to have.There is -- it's at https://www.playframework.com/documentation/2.5.x/PluginsToModules
Honestly, we would rather officially support fewer of those ORMs, just because having to update, maintain, and document them is a pretty significant burden on the Play team. The ideal is that we make it easy enough to integrate with Play that the library authors can easily update things without our help. Usually, if the library is well-maintained, it will be updated within a week or two of the release.For a lot of third-party libraries it's not difficult to integrate with Play yourself. Usually the only things you need to do are create a component to integrate with the application lifecycle and maybe create a few bindings for dependency injection.
But what are the differences between 2.4 and 2.5 modules? I tried a lot of 2.4 modules on 2.5 and the majority of them didn't works.I have read the module documentation and, e.g., the JongoModule.java follow the specification but it's evicted by Play! 2.5.
So there might be some difference that is not included in the documentation?
Thanks for information, but then the documentation is incorrect because on https://playframework.com/documentation/2.5.x/JavaPlayModules I read: "in 2.5.x, Plugins have been replaced with Play modules.".
public class MyModule extends play.api.inject.Module {
public Seq<Binding<?>> bindings(Environment environment, Configuration configuration) {
return seq(
bind(MyApi.class).toSelf()
);
}
}
public class JongoModule extends Module {
@Override
public Seq<Binding<?>> bindings(Environment environment, Configuration configuration) {
return seq(bind(PlayJongo.class).toSelf());
}
}
I'm a bit confused. Is there an error you're getting Enrico whilst using PlayJongo?
Yes. The module is evicted by Play.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.typesafe.play:play-netty-server_2.11:2.4.2 -> 2.5.0 (caller: docarchive:docarchive_2.11:1.0-SNAPSHOT, uk.co.panaxiom:play-jongo_2.11:1.0.1-jongo1.2)
[warn] * com.typesafe.play:play-java_2.11:2.4.2 -> 2.5.0 (caller: com.typesafe.play:filters-helpers_2.11:2.5.0, docarchive:docarchive_2.11:1.0-SNAPSHOT, com.typesafe.play:play-java-jdbc_2.11:2.5.0, uk.co.panaxiom:play-jongo_2.11:1.0.1-jongo1.2, com.typesafe.play:play-java-ws_2.11:2.5.0)
If I remove PlayJongo from build.sbt all works fine.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/85a087a1-bee5-4450-b61a-fde00b20b319%40googlegroups.com.