[2.5 Java] Which mongo plugin?

閲覧: 375 回
最初の未読メッセージにスキップ

Enrico Morelli

未読、
2016/03/07 10:20:272016/03/07
To: play-framework
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?

Greg Methvin

未読、
2016/03/07 13:01:572016/03/07
To: play-framework
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.

On Mon, Mar 7, 2016 at 7:20 AM, Enrico Morelli <enrico....@gmail.com> wrote:
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.



--
Greg Methvin
Senior Software Engineer

Enrico Morelli

未読、
2016/03/08 4:23:112016/03/08
To: play-framework


On Monday, March 7, 2016 at 7:01:57 PM UTC+1, Greg Methvin wrote:
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.



I opened the issue ;-)

Play! is a wonderful and modern framework, but I think should have an official  MongoDB plugin like the various SQL ORM linked in the documentation.

Greg Methvin

未読、
2016/03/09 20:11:462016/03/09
To: play-framework
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.

--
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.

For more options, visit https://groups.google.com/d/optout.

Igmar Palsenberg

未読、
2016/03/10 12:52:432016/03/10
To: play-framework
 
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.


Igmar 

Will Sargent

未読、
2016/03/10 23:26:572016/03/10
To: play-fr...@googlegroups.com
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.

Igmar Palsenberg

未読、
2016/03/11 2:56:072016/03/11
To: play-framework
 
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.


That's more targeted at old Play plugins to become DI modules. I'm talking about having an existing Java library, taking it apart, make it DI ready, and if applicable, also make it asynchronous.

That's quite hard, especially if you haven't done that a lot. At least, on the library I tried :-)


Igmar

Enrico Morelli

未読、
2016/03/11 8:22:052016/03/11
To: play-framework


On Thursday, March 10, 2016 at 2:11:46 AM UTC+1, Greg Methvin wrote:
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?

Igmar Palsenberg

未読、
2016/03/11 8:52:032016/03/11
To: play-framework

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?

Modules don't exist anymore in 2.5. A "module" in 2.5 is just a bunch of classes that are bound in DI.


Igmar

Enrico Morelli

未読、
2016/03/11 9:04:132016/03/11
To: play-framework


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.".

Please, my head is near to explode :-o , where I can find instruction to be able to use/create 2.5 libraries?

Igmar Palsenberg

未読、
2016/03/11 9:18:542016/03/11
To: play-framework
 
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.".

The documentation is fine : Plugins are out, modules are in. A "module" is just classes bound in DI.


Igmar

Enrico Morelli

未読、
2016/03/11 10:24:052016/03/11
To: play-framework

Ok, I'm going crazy.  So in the 2.5 documentation the example is:

public class MyModule extends play.api.inject.Module {
   
public Seq<Binding<?>> bindings(Environment environment, Configuration configuration) {
       
return seq(
                bind
(MyApi.class).toSelf()
       
);
   
}
}


The JongoModule is the following:

public class JongoModule extends Module {

   
@Override
   
public Seq<Binding<?>> bindings(Environment environment, Configuration configuration) {
       
return seq(bind(PlayJongo.class).toSelf());
   
}
}

 
which may be the incompatibility? What other things I've to check?

raunak

未読、
2016/03/11 20:33:282016/03/11
To: play-framework
I'm a bit confused. Is there an error you're getting Enrico whilst using PlayJongo?

Enrico Morelli

未読、
2016/03/14 4:38:152016/03/14
To: play-framework


On Saturday, March 12, 2016 at 2:33:28 AM UTC+1, raunak wrote:
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.

Igmar Palsenberg

未読、
2016/03/14 5:47:362016/03/14
To: play-framework

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.

Looks like it depends on Play 2.4, which isn't compatible with 2.5 on a binary level.  

Greg Methvin

未読、
2016/03/14 6:14:232016/03/14
To: play-framework
An eviction warning in sbt just tells you it is using the newer version of those libraries. It's quite possible everything works just fine if play-jongo doesn't happen to use any of the things that changed between the releases, though it would obviously be better if they built off Play 2.5 so you know for sure.

--
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.

For more options, visit https://groups.google.com/d/optout.

Enrico Morelli

未読、
2016/03/14 6:26:252016/03/14
To: play-framework


You are ready. I recompiled using 2.5 libraries and it works fine.

Thanks
全員に返信
投稿者に返信
転送
新着メール 0 件