can togglz be used with java play 2.5.15

21 views
Skip to first unread message

Natasha Tarnopolsky

unread,
May 24, 2018, 8:12:50 AM5/24/18
to togglz-users
Hi,

Can it work out with javaplay at all? 
Trying to set up togglz with java play with no success.
after adding following dependencies in build.sbt - 
libraryDependencies += "org.togglz" % "togglz-cdi" % "2.5.0.Final"
libraryDependencies += "org.togglz" % "togglz-core" % "2.5.0.Final"
and implementing FeatureFlagConfiguration 
as described in help gettin following error - 
 - Exception in thread "Thread-9" java.util.ServiceConfigurationError: org.togglz.core.spi.BeanFinder: Provider org.togglz.cdi.spi.CDIBeanFinder could not be instantiated
I assume featureflaconfiuration should be injected somehow, but can't find how.


Thank you in advance. 

Christian Kaltepoth

unread,
May 24, 2018, 11:07:15 AM5/24/18
to togglz...@googlegroups.com
I'm not familiar with Play, but AFAIK it is not built on top of Servlet, correct?

In this case using Togglz with Play won't be straight forward, but not impossible. Basically you have to implement the BeanFinder contract to integrate with Play. This SPI must be implemented so that Togglz can lookup objects managed by some kind of "container". I guess Play also has kind of component model. In this case you have to provide a special PlayBeanFinder. This way Togglz will find your FeatureFlagConfiguration instance if it is managed by Play.

Christian

Natasha Tarnopolsky

unread,
May 27, 2018, 10:55:37 AM5/27/18
to togglz-users
Hi Christian,

Thank you for your quick response!
:) 

Thanks a lot!
Reply all
Reply to author
Forward
0 new messages