If you go that route, also make sure that any subscribers have a lower
menuOrder than any seed services, using @DomainServiceLayout#menuOrder.
The reason for this is that, when a seed service creates objects, it will
publish events onto the event bus.  If a subscriber is then subsequently
registered on the event bus, the framework will fail fast (because the
subscriber has missed those events already published).


2015-12-18 10:57 GMT+00:00 Jeroen van der Wal <[email protected]>:

> Hi Joerg,
>
> You can also run a fixture when a service is initialised. We do that when
> loading seed data in Estatio:
>
>
> https://github.com/estatio/estatio/blob/1e85e43af7854f74dd3b39f44f6d9432168b3765/estatioapp/fixture/src/main/java/org/estatio/fixture/security/EstatioSecurityModuleSeedService.java#L33-L37
>
>
>
> 2015-12-18 10:35 GMT+01:00 Dan Haywood <[email protected]>:
>
> > 2015-12-09 12:50 GMT+00:00 Rade, Joerg / Kuehne + Nagel / Ham GI-PS <
> > [email protected]>:
> >
> > > Hi,
> > >
> > > my fixtures have grown into a couple of files the application needs to
> > > read in when it starts the first time (and possibly later on when the
> > files
> > > content change).
> > >
> > > What is the right way to do this?
> > > Hook up into the webapp start?
> > > Use events?
> > >
> > >
> > Hi Jorg,
> >
> > sorry that no-one seemed to respond on this query of yours.  Did you
> find a
> > solution?
> >
> > Our standard approach is to use fixture scripts [1].  These can be run in
> > on start-up typically by being specified in the AppManifest [2], see eg
> the
> > simpleapp [3].
> >
> > Alternatively just set "isis.fixtures" and
> > "isis.persistor.datanucleus.install-fixtures" properties.
> >
> > In terms of implementations, you might also want to check out the Isis
> > addons' Excel module [4], by using ExcelFixture [5] and overriding
> > ExcelFixtureRowHandler (same package).  An example can be found in
> > contactapp [6]
> >
> > HTH
> > Dan
> >
> >
> > [1] http://isis.apache.org/guides/ugtst.html#_ugtst_fixture-scripts
> > [2]
> >
> >
> https://isis.apache.org/guides/rgcms.html#_rgcms_classes_AppManifest-bootstrapping
> > [3]
> >
> >
> https://github.com/apache/isis/blob/master/example/application/simpleapp/app/src/main/java/domainapp/app/DomainAppAppManifestWithFixtures.java
> > [4] https://github.com/isisaddons/isis-module-excel
> > [5]
> >
> >
> https://github.com/isisaddons/isis-module-excel/blob/master/dom/src/main/java/org/isisaddons/module/excel/dom/ExcelFixture.java
> > [6]
> >
> >
> https://github.com/incodehq/contactapp/blob/master/backend/fixture/src/main/java/domainapp/fixture/scenarios/demo/ContactRowHandler.java
> >
> >
> >
> > Thanks in advance
> > > Jörg
> > >
> > >
> > > Kühne + Nagel (AG & Co.) KG
> > > Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE
> > > 812773878.
> > > Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Reiner Heiken (Vors.),
> Dirk
> > > Blesius, Martin Brinkmann, Matthias Heimbach, Jan-Hendrik Köstergarten,
> > > Nicholas Minde, Lars Wedel, Jens Wollesen.
> > > Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform:
> > > Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745,
> > > Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
> > > Geschäftsleitung Region Westeuropa: Yngve Ruud (Vors.), Richard Huhn,
> > > Diederick de Vroet, Björn Johansson, Jan Kunze, Bruno Mang, Stefan
> Paul,
> > > Holger Ketz, Dominic Edmonds.
> > >
> > > Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen
> > > Spediteursbedingungen (ADSp), jeweils neuester Fassung. Wir verweisen
> > > insbesondere auf die vom Gesetz abweichenden Haftungsbeschränkungen von
> > > Ziffer 23 und 24 ADSp. Den vollständigen Text der ADSp übersenden wir
> > Ihnen
> > > gerne auf Anfrage und können Sie auch unter
> http://www.kuehne-nagel.com
> > > einsehen. Ergänzend wird vereinbart, dass (1) Ziffer 27 ADSp im Rahmen
> > > internationaler Übereinkommen weder unsere Haftung noch die Zurechnung
> > des
> > > Verschuldens von Leuten und sonstigen Dritten zu Gunsten des
> > Auftraggebers
> > > erweitert, und (2) wir in den im deutschen Seehandelsrecht aufgeführten
> > > Fällen des nautischen Verschuldens oder Feuer an Bord nur für eigenes
> > > Verschulden und (3) im Sinne der CMNI genannten Voraussetzungen nicht
> für
> > > nautisches Verschulden, Feuer an Bord oder Mängel des Schiffes haften.
> > >
> >
>

Reply via email to