Re: How to use new IPageStore
Thanks a million Sven! On Tue, 23 Apr 2019 at 04:02, Sven Meier wrote: > > Hi Maxim, > > wicketstuff-datastore has examples for this, like: > > setPageManagerProvider(new DefaultPageManagerProvider(this) > { > @Override > protected IPageStore newPersistentStore() > { > > HazelcastInstance instance = > Hazelcast.newHazelcastInstance(); > > return new SerializingPageStore(new > HazelcastDataStore(getName(), instance), > getFrameworkSettings().getSerializer()); > } > }); > > I.e. a SerializingPageStore does the conversion to/from serialized pages. > > Have fun > Sven > > > Am 22.04.19 um 17:17 schrieb Maxim Solodovnik: > > Hello Sven, > > > > I'm trying to migrate OpenMeetings code to wicket9 > > The migration was easy, moving to junit5 was doable > > All tests are green > > > > BUT real application throws Exceptions :( > > > > I'm setting Hazelcast as follows: [1] > > I have checked the code And found no way to pass SerializedPage to > > HazelcastDataStore > > > > SerializedPage is class and it is final > > > > Could you please guide me what am I doing wrong? > > > > > > [1] > > https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java#L225 > > > > ERROR 04-22 21:55:56.068 o.a.w.u.l.ListenerCollection:124 > > [nio-5443-exec-1] - Error invoking listener: > > org.apache.wicket.Application$2@68756190 > > org.apache.wicket.WicketRuntimeException: CassandraDataStore works > > with serialized pages only > > at > > org.wicketstuff.datastores.hazelcast.HazelcastDataStore.addPersistedPage(HazelcastDataStore.java:122) > > at > > org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128) > > at > > org.apache.wicket.pageStore.InSessionPageStore.addPage(InSessionPageStore.java:139) > > at > > org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:99) > > at org.apache.wicket.page.PageManager.detach(PageManager.java:79) > > > > > > -- > > WBR > > Maxim aka solomax -- WBR Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to use new IPageStore
Hi Maxim, wicketstuff-datastore has examples for this, like: setPageManagerProvider(new DefaultPageManagerProvider(this) { @Override protected IPageStore newPersistentStore() { HazelcastInstance instance = Hazelcast.newHazelcastInstance(); return new SerializingPageStore(new HazelcastDataStore(getName(), instance), getFrameworkSettings().getSerializer()); } }); I.e. a SerializingPageStore does the conversion to/from serialized pages. Have fun Sven Am 22.04.19 um 17:17 schrieb Maxim Solodovnik: Hello Sven, I'm trying to migrate OpenMeetings code to wicket9 The migration was easy, moving to junit5 was doable All tests are green BUT real application throws Exceptions :( I'm setting Hazelcast as follows: [1] I have checked the code And found no way to pass SerializedPage to HazelcastDataStore SerializedPage is class and it is final Could you please guide me what am I doing wrong? [1] https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java#L225 ERROR 04-22 21:55:56.068 o.a.w.u.l.ListenerCollection:124 [nio-5443-exec-1] - Error invoking listener: org.apache.wicket.Application$2@68756190 org.apache.wicket.WicketRuntimeException: CassandraDataStore works with serialized pages only at org.wicketstuff.datastores.hazelcast.HazelcastDataStore.addPersistedPage(HazelcastDataStore.java:122) at org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128) at org.apache.wicket.pageStore.InSessionPageStore.addPage(InSessionPageStore.java:139) at org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:99) at org.apache.wicket.page.PageManager.detach(PageManager.java:79) -- WBR Maxim aka solomax
Re: HttpSessionDataStore in Wicket 9
Hi Thomas, many thanks for testing so early! Set a custom provider of the page manager, see wicketstuff's gae-initializer as an example: application.setPageManagerProvider(new GaePageManagerProvider(application, maxPages)); https://github.com/wicketstuff/core/blob/master/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaePageManagerProvider.java Have fun Sven Am 22.04.19 um 18:47 schrieb Thomas Heigl: Hi all, I just experimentally upgraded my application to 9.0.0-M1. Most things are straight forward, but I'm struggling with replicating my current page manager configuration using the new API. My current configuration for Wicket 8 looks like this: setPageManagerProvider(new DefaultPageManagerProvider(this) { @Override protected IDataStore newDataStore() { return new HttpSessionDataStore(getPageManagerContext(), new PageNumberEvictionStrategy(10)); } }); What is the Wicket 9 equivalent of this? Thanks, Thomas
Untouching pages in Wicket 9
Hi all, What is the equivalent of the following line in Wicket 9? Session.get().getPageManager().untouch(content.getPage()) There is only `removePage` now, but it doesn't do the same thing as far as I can see. Is it still possible to untouch pages in ajax requests so they won't be serialized again? Best, Thomas
HttpSessionDataStore in Wicket 9
Hi all, I just experimentally upgraded my application to 9.0.0-M1. Most things are straight forward, but I'm struggling with replicating my current page manager configuration using the new API. My current configuration for Wicket 8 looks like this: setPageManagerProvider(new DefaultPageManagerProvider(this) { > @Override > protected IDataStore newDataStore() { > return new HttpSessionDataStore(getPageManagerContext(), new > PageNumberEvictionStrategy(10)); > } > }); What is the Wicket 9 equivalent of this? Thanks, Thomas
How to use new IPageStore
Hello Sven, I'm trying to migrate OpenMeetings code to wicket9 The migration was easy, moving to junit5 was doable All tests are green BUT real application throws Exceptions :( I'm setting Hazelcast as follows: [1] I have checked the code And found no way to pass SerializedPage to HazelcastDataStore SerializedPage is class and it is final Could you please guide me what am I doing wrong? [1] https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java#L225 ERROR 04-22 21:55:56.068 o.a.w.u.l.ListenerCollection:124 [nio-5443-exec-1] - Error invoking listener: org.apache.wicket.Application$2@68756190 org.apache.wicket.WicketRuntimeException: CassandraDataStore works with serialized pages only at org.wicketstuff.datastores.hazelcast.HazelcastDataStore.addPersistedPage(HazelcastDataStore.java:122) at org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128) at org.apache.wicket.pageStore.InSessionPageStore.addPage(InSessionPageStore.java:139) at org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:99) at org.apache.wicket.page.PageManager.detach(PageManager.java:79) -- WBR Maxim aka solomax