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

已查看 176 次
跳至第一个未读帖子

Suraj Mundada

未读,
2016年5月10日 13:01:532016/5/10
收件人 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

未读,
2016年5月10日 18:50:472016/5/10
收件人 play-framework
upgrade to play 2.5.x and play-ebean 3.0.0 and you are good to go

Suraj Mundada

未读,
2016年5月11日 06:21:552016/5/11
收件人 play-framework
Thanks.

Suraj Mundada

未读,
2016年5月24日 10:00:312016/5/24
收件人 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

未读,
2016年5月27日 02:10:562016/5/27
收件人 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
已删除帖子

Peace MICHAELS

未读,
2016年5月27日 20:57:362016/5/27
收件人 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

未读,
2016年5月30日 14:29:132016/5/30
收件人 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

未读,
2016年5月31日 12:55:272016/5/31
收件人 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

未读,
2016年6月2日 06:14:042016/6/2
收件人 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

未读,
2016年6月2日 09:28:102016/6/2
收件人 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

未读,
2016年6月2日 09:32:182016/6/2
收件人 play-fr...@googlegroups.com

Suraj Mundada

未读,
2016年6月6日 04:20:422016/6/6
收件人 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

未读,
2016年6月8日 02:54:392016/6/8
收件人 play-framework
Any ideas?
回复全部
回复作者
转发
0 个新帖子