[play-2.4.6] [java] java-ebean plugin for eban 7.9.1 upwards

176 views
Skip to first unread message

Suraj Mundada

unread,
May 10, 2016, 1:01:53 PM5/10/16
to play-framework
Hi,

I want to use Ebean 7.9.1 or higher version to take advantage of Apache Ignite caching support added to ebean 7.9.1.

Current play-eban plugin version is supporting ebean 7.6.1 (https://github.com/playframework/play-ebean/blob/master/build.sbt)

Any idea when play-ebean plugin will support ebean 7.9.1 or higher version? 

Regards,
Suraj

Peace MICHAELS

unread,
May 10, 2016, 6:50:47 PM5/10/16
to play-framework
upgrade to play 2.5.x and play-ebean 3.0.0 and you are good to go

Suraj Mundada

unread,
May 11, 2016, 6:21:55 AM5/11/16
to play-framework
Thanks.

Suraj Mundada

unread,
May 24, 2016, 10:00:31 AM5/24/16
to play-framework
Hi Michaels,

Do you have working example of play-ebean 3.0.0 and using Apache Ignite for L2/L3 caching? 

I am trying to get it working. But not able to configure it correctly. Also posted it on group here:


Not able to get a breakthrough. 

Any ideas? 

Suraj

Suraj Mundada

unread,
May 27, 2016, 2:10:56 AM5/27/16
to play-framework

Hey Guys,

Any pointer on this? I am not able to resolve this issue and move forward on using ebean plugin 3.0.0 and Apache Ignite as L2/L3 cache.

Regards,
Suraj
Message has been deleted

Peace MICHAELS

unread,
May 27, 2016, 8:57:36 PM5/27/16
to play-framework
Hello Suraj, i tried out the Ebean Apache Ignite integration and it worked, using play 2.5.3. Add these to the library dependencies in build.sbt of your project:

"org.avaje.ebeanorm"    %  "avaje-ebeanorm"        % "7.11.4",
  "org.avaje.ebeanorm"    %  "avaje-ebeanorm-ignite"        % "1.2.1",
  "org.avaje.ebeanorm" % "avaje-ebeanorm-agent" % "4.10.1"

then annotate your entity classes with  com.avaje.ebean.annotation.Cache. It should work without problems

Suraj Mundada

unread,
May 30, 2016, 2:29:13 PM5/30/16
to play-framework
Thanks Michaels. It worked for me. I enabled following loggers in my logback.xml

<logger name="org.avaje.ebean.cache.QUERY" level="DEBUG"/>
<logger name="org.avaje.ebean.cache.BEAN" level="DEBUG"/>
<logger name="org.avaje.ebean.cache.COLL" level="DEBUG"/>
<logger name="org.avaje.ebean.cache.NATKEY" level="DEBUG"/>

Logs shows that entity beans that I retrieve first time are put in cache. When retrieved again, I can not see sql query fired on DB. Meaning it must be retrieved from cache.

However, I got following warning:

 Class "com.avaje.ebeaninternal.server.cache.CachedBeanData" cannot be written in binary format because it either implements Externalizable interface or have writeObject/readObject methods. Please ensure that all nodes have this class in classpath. To enable binary serialization either implement Binarylizable interface 

ignite-core-1.5.0.final.jar containing Binarylizable.class is available in .ivy2 folder. However, it is not on build path. So, I can not implement this class on my entity. Can this be ignored?

Next, I want to test Clustered Ignite cache. I want to test cluster of 2 ignite server instances. Docs (http://apacheignite.gridgain.org/docs/cluster-config) says it is auto-discovered using TcpDiscoverySpiDoes that mean I can simply start my play+ebean+ignite application on 2 servers in my n/w and ignite client will auto discover both the ignite server instance?

Also, which deployment mode (private/isolated/shared etc) I should choose?

Thanks again.

Suraj

 

Suraj Mundada

unread,
May 31, 2016, 12:55:27 PM5/31/16
to play-framework
Sorry to push on this. But can you please help with some pointers on clustering? 

I want to complete this POC and use it in my production application. 

Also want to document and publish our discussion with code sample for developers who might be interested in Play + Ebean + Ignite.

Suraj Mundada

unread,
Jun 2, 2016, 6:14:04 AM6/2/16
to play-framework
I looked at https://apacheignite.readme.io/docs/cluster-config which tells how cluster can be configured. According to docs, Ignite, nodes can discover each other by using DiscoverySpi.

XML configuration for Multicast Based Discovery is as below:
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
  ...
 
<property name="discoverySpi">
   
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
     
<property name="ipFinder">
       
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
         
<property name="multicastGroup" value="228.10.10.157"/>
       
</bean>
     
</property>
   
</bean>
 
</property>
</bean>
 
Where do I add this xml configuration in my play application? Should I create a new conf file or add it to one of existing conf files?

Also, what does <property name="multicastGroup" value="228.10.10.157"/> indicate? Does it indicate IP address of multicast sender?

Regards,
Suraj


Peace MICHAELS

unread,
Jun 2, 2016, 9:28:10 AM6/2/16
to play-fr...@googlegroups.com
i think that should go in the root of the project. It would probably
be sometime during the weekend before i can test this out.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "play-framework" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/play-framework/3GKMEnUzxrw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> play-framewor...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/play-framework/c309a9e9-c5da-4127-9894-ca7c90593821%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Peace MICHAELS

unread,
Jun 2, 2016, 9:32:18 AM6/2/16
to play-fr...@googlegroups.com

Suraj Mundada

unread,
Jun 6, 2016, 4:20:42 AM6/6/16
to play-framework
I looked at ebean-ignite-config.xml and node1-ebean.properties given in the examples. However, I guess both files don't handle clustering. 

Regards,
Suraj

Suraj Mundada

unread,
Jun 8, 2016, 2:54:39 AM6/8/16
to play-framework
Any ideas?
Reply all
Reply to author
Forward
0 new messages