Re: Ready for a 1.9.0 release?
Hi Dan. Seems perfect to me to have a monthly release schedule Regarding releasing 1.9.0 now we’re currently with a 1.9.0 SNAPSHOT but this week will be difficult to migrate and test our platform to verify all tests still pass after the AppSpecs changes. If you consider those tests are needed, next week would be better for us, when dev team return from holidays, but perhaps that’s not needed. Regards, Oscar El 16/8/2015, a las 9:50, Dan Haywood d...@haywood-associates.co.uk escribió: On 16 August 2015 at 08:16, Kevin Meyer ke...@kmz.co.za wrote: Question: Given the changes, shouldn't we release a major release (2.0.0) [1]? The API certainly has changed since 1.7 (I call annotations part of the API). As you say, we aim to follow semantic versioning. But although we've deprecated those old annotations they are still supported; which means that we stay on 1.x codeline. (I'm looking forward to moving up to 2.0 at some point in the future so I can delete a bunch of deprecated stuff, but I don't think it's been deprecated for long enough... the old annotations were deprecated less than a year ago) While on this topic, worth saying that setting the isis.reflector.validator.allowDeprecated configuration property to false is a useful migration step as it will flag all uses of the deprecated annotations. [2] Re: your proposal for regular releases after this should be ok to push enhancements out into non-snapshot release, my only concern is that regularly releases should be OK as long as user devs developing with our platform don't have to change any existing code. Absolutely, the intention is that it we would maintain backward compatibility of the programming model (annotations etc). As can be seen through the various 1.x releases, we have changed/improved the bootstrapping and organization of code, and that might continue. eg the move to DN 4.x changes some of the pom.xml entries, and the new appManifest stuff recommends introducing a new myapp-app module. See migration notes [3] It's OK if it's a bugfix/feature/enhancement that adds new functionality, when user devs just add more code to access it - but I would be concerned about monthly releases that require changes to code in production Agreed; that's not the intention. I'm interested in other opinions.. Cheers! Kevin PS: The new asciidoc website looks really good! Cheers... it took some work, and still work in progress, but I'm pleased with how it's turned out and also how easy it is to update. [1] http://semver.org/ [2] http://isis.apache.org/guides/rg.html#_rg_runtime_configuring-core [3] http://isis.apache.org/migration-notes.html#_release-notes_migration-notes_1.8.0-to-1.9.0 Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: Ideas for online forms application.
Hi to all. I have a domain implemented in Apache Isis with some similarities. In our case, we have Item entities with a LOT of custom options that can be defined over them (ItemOption). Those ItemOption’s are grouped in ItemOptionGroup’s, that can be reused by different Item’s. ItemOptions can be of different kinds. Currently implemented ones: - GenericItemOptionWithChoices - GenericItemOptionsForDate - GenericItemOptionsForNumber - GenericItemOptionsForText Also, one Item can have SubItems (which are other Item that must be bought together - and that can also contain its own ItemOption’s -). There’s also an Order entity where users can order specific Product configurations. so when placing the Order you must concrete which Product options you want. The Ordered Item Options, etc. have custom compareTo” and “title” methods to properly show selected values. Current entities are similar to this: ITEM-RELATED ENTITIES @PersistenceCapable public abstract class ItemOption extends AbstractMultiTenantEntity { …@PersistenceCapable @XMSEntityNames({ @XMSEntityName(locale = es, name = Grupo de Opciones de Artículo) }) public abstract class ItemOptionsGroup extends AbstractMultiTenantEntity { // {{ Options (Collection) @Persistent(mappedBy = itemOptionGroup, dependentElement = true) private SortedSetItemOptionGroupOption options = new TreeSetItemOptionGroupOption(); ... // }} } @PersistenceCapable public class ItemOptionGroupOption extends AbstractMultiTenantUnnamedEntity { // {{ ItemOptionsGroup (property) private ItemOptionsGroup itemOptionsGroup; ... // }} // {{ ItemOption (property) private ItemOption itemOption; ... // }} // {{ OrderingCode (property) private String orderingCode; … // }} @PersistenceCapable @XMSEntityNames({ @XMSEntityName(locale = es, name = Artículo) }) public abstract class Item extends AbstractMultiTenantEntity { // {{ OptionGroup (property) private ItemOptionsGroup optionsGroup; ... // }} // {{ SubItems (Collection) @Persistent(mappedBy = parentItem, dependentElement = true) private SortedSetSubItem subItems = new TreeSetSubItem(); … // }} ORDER-RELATED ENTITIES @PersistenceCapable public abstract class Order extends AbstractMultiTenantUnnamedEntity { // {{ ItemsOrdered (Collection) @Persistent(mappedBy = order, dependentElement = true) private SortedSetOrderedItem itemsOrdered = new TreeSetOrderedItem(); ... // {{ addItem (action) @ActionSemantics(Of.SAFE) @MemberOrder(name = itemsOrdered, sequence = 010) public abstract OrderedItem addItem(@XMSActionField(locales = { @XMSLocale(locale = es, caption = Artículo) }) @Named(Item) final Item item, @XMSActionField(locales = { @XMSLocale(locale = es, caption = Unidades) }) @Named(Units) final BigDecimal units, @XMSActionField(locales = { @XMSLocale(locale = es, caption = Descripción) }) @Named(Description) @Optional final String description); protected T extends OrderedItem T createPersistentOrderedItem(final ClassT clazz, final Item item, final BigDecimal amount, final String description) { T orderedItem = this.getDomainFactoryService().newTransientMultiTenantUnnamedEntity(clazz, null, description); this.wrapSkipRules(orderedItem).setOrder(this); this.wrap(orderedItem).setQuantity(amount); this.wrap(orderedItem).setDescription(description); orderedItem = this.onInitializeTransientOrderedItem(orderedItem); // This setter invokation will persist the Entity, as it will also // insert on dependant entities if there are Options or Sub-Items. this.wrapSkipRules(orderedItem).setItem(item); // if no Options or SubItems present ... this.persistIfNotAlready(orderedItem); return orderedItem; } @PersistenceCapable public abstract class OrderedItem extends AbstractMultiTenantUnnamedEntity { // {{ Options (Collection) @Persistent(mappedBy = orderedItem, dependentElement = true) private SortedSetOrderedItemOption options = new TreeSetOrderedItemOption(); …. private void configureOptions(final Item newItem) { // Clear previously existing options. this.clearOptions(); // Create new ones. if ((newItem != null) (newItem.getOptionsGroup() != null)) { for (final ItemOptionGroupOption current : this.getItem().getOptionsGroup().getOptions()) { final Class? extends OrderedItemOption clazz1 = this.orderedItemOptionsEquivalences.orderedItemOptionClassFor(current.getItemOption().getClass()); final OrderedItemOption orderedItemOption = (this.getDomainFactoryService()).newTransientMultiTenantUnnamedEntity(clazz1, null, null); this.wrapSkipRules(orderedItemOption).setOrderedItem(this);
Re: Caching Actions by simply using an annotation (param)
Hi, Dan. I’m planning on implement this. I’ve just created a Jira ticket [1]. Please, can you review and comment my implementation proposal? Thanks! Oscar [1] https://issues.apache.org/jira/browse/ISIS-1157 https://issues.apache.org/jira/browse/ISIS-1157 El 10/5/2015, a las 17:25, GESCONSULTOR o@gesconsultor.com escribió: Let me try it! I'll not been able to implement it immediately but please, tell me the hints :) El 10/5/2015, a las 13:25, Dan Haywood d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk escribió: Hi Oscar, yes, this makes a lot of sense, and is something I've thought about in the past myself (though I don't think it's been discussed on the mailing list before). In terms of API, it only really makes sense to enable caching for safe (query-only) actions. So I suggest that it might be better to extend the ActionSemantics enum: @Override @Action(semantics = SemanticsOf.SAFE_AND_REQUEST_CACHED) public SortedSetIESG relevantSnpGenotypes(final IE inputElement, final Kit kit) { if (kit != null) { return kit.findAllAssociatedSNPGenotypesForInputElement(inputElement, AlgorithmImplementation.this.IESGClass); } else { return Sets.newTreeSet(); } } I suggest the word REQUEST is in the enum somewhere just so it's obvious that the caching is only for the duration of a request (rather than session or something else). This feature is probably pretty easy to implement. I can do it if you want, but if you'd like to give it a go I can provide some pointers if you want? cheers Dan On 10 May 2015 at 12:14, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com wrote: Hi all. We currently have available the org.apache.isis.applib.services.queryresultscache.QueryResultsCache” service to cache the result of an Action invocation for the same transation. So if we call a SAFE action that is costly to be computed, many times during the same transaction, it’s only computed once, as the 2nd time and so on the result will be obtained from a LocalThread cache. Current usage idiom is something like: // {{ relevantSnpGenotypes (programmatic - cached) @Override @Action(semantics = SemanticsOf.SAFE) public SortedSetIESG relevantSnpGenotypes(final IE inputElement, final Kit kit) { return this.queryResultsCache.execute(new CallableSortedSetIESG() { @Override public SortedSetIESG call() throws Exception { if (kit != null) { return kit.findAllAssociatedSNPGenotypesForInputElement(inputElement, AlgorithmImplementation.this.IESGClass); } else { return Sets.newTreeSet(); } } }, Kit.class, relevantSnpGenotypes, inputElement, kit); } // }} // {{ injected: QueryResultsCache @Inject protected QueryResultsCache queryResultsCache; // }} But perhaps would it be possible to ease its usage by means of an annotation ? Something like: @Action(semantics = SemanticsOf.SAFE, cacheResults = true) If so, the usage idiom would change to simply the action’s code, as the one responsible for caching could be a Facet, for example? // {{ relevantSnpGenotypes (programmatic - cached) @Override @Action(semantics = SemanticsOf.SAFE, cacheResults = true) public SortedSetIESG relevantSnpGenotypes(final IE inputElement, final Kit kit) { if (kit != null) { return kit.findAllAssociatedSNPGenotypesForInputElement(inputElement, AlgorithmImplementation.this.IESGClass); } else { return Sets.newTreeSet(); } } // }} Just to know others opinion about if it has sense and if it would be possible. I’m pretty sure this would be one of those “killer functions” for complex Domains that would appear on a summary list, despite being currently being available. Thanks! Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F contactenos.html.gif 902 900 231 / 620 267 520 Pasted Graphic 1.tiff http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou gesdatos-software.gif http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou blog.png http://www.GesConsultor.com http://www.gesconsultor.com/ gesconsultor_logo_blue_email.png Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje
Re: FixtureScripts - method to initiate a new transaction
The concrete exception thrown is: java.lang.AssertionError: Transaction is in state of 'COMMITTED' at org.junit.Assert.fail(Assert.java:88) at org.apache.isis.core.integtestsupport.IsisSystemForTest.commitTran(IsisSystemForTest.java:744) at org.apache.isis.core.integtestsupport.scenarios.ScenarioExecutionForIntegration.endTran(ScenarioExecutionForIntegration.java:76) at org.apache.isis.core.integtestsupport.IntegrationTestAbstract.nextTransaction(IntegrationTestAbstract.java:80) at org.apache.isis.core.integtestsupport.IntegrationTestAbstract.nextRequest(IntegrationTestAbstract.java:91) at com.tellmegen.integtests.domain.model.algorithms.complexdiseases.ComplexDiseaseAlgorithmImplementationTests.totalOrRatio(ComplexDiseaseAlgorithmImplementationTests.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146) at org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate(ExceptionRecognizerTranslate.java:32) at org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:214) at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) El 28/5/2015, a las 14:00, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Related with this, I’m trying to test the following: @Test public void totalOrRatio() { // given kit.assignToPerson(account.getAccountOwner()); this.nextRequest(); kit.getRegisteredForPerson().setSex(Sex.Man); …. } Where the Kit.getRegisteredForPerson() is cached: // {{ RegisteredForPerson (property) @Property(editing = Editing.DISABLED, notPersisted = true) @MemberOrder(sequence = 1) public Person getRegisteredForPerson() { return this.queryResultsCache.execute(new CallablePerson() { @Override public Person call() throws Exception { return Kit.this.findRegisteredToPerson(); } }, this.getClass(), findRegisteredToPerson); } // }} Despite invoking “this.nextRequest()” on the integtest, seems that the cache is still alive (being it a @RequestScoped service). Would this also need to be improved for testing @RequestScoped services? Thanks! El 28/5/2015, a las 13:39, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com escribió: Hi all. When using FixtureScripts, there can be many actions that, on the real world, are execute in different time contexts. For example, a user
Experimenting problems with QueryResultsCache while testing
Hi all. I have a project that uses isis-addons-security. So it installs the TenantedAuthorizationFacetDefault Which is invoked when using wrapped calls in order to evaluate if that action is allowed or hidden. That said, I have a test with the following code: // given ... final Trait trait = this.wrap(this.traits).createTrait(outcome_higherLimitIncluded); this.wrap(trait).upsertScoringRange(-1000, -40, Bad Result); Please, notice that the first invocation is wrapped, and it has properly passed. When the test executes the second invocation, it will fail with a HiddenException, telling that the user has not bee found. But the inner problem is that the ServiceInstantiator is returning “null” when invoking the “execute” method. See the stack trace right there, when the execution has been paused on ServiceInstantiator, line 225. Please am I missing something? It has started to happen today … Thanks! Thread [main] (Suspended) org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.Object[]) line: 225 org.apache.isis.applib.services.queryresultscache.QueryResultsCache_$$_jvstd14_3.execute(java.util.concurrent.Callable, java.lang.Class, java.lang.String, java.lang.Object...) line: not available org.isisaddons.module.security.facets.TenantedAuthorizationFacetDefault.findApplicationUser(java.lang.String) line: 158 org.isisaddons.module.security.facets.TenantedAuthorizationFacetDefault.pathsFor(org.apache.isis.core.metamodel.interactions.InteractionContext?) line: 114 org.isisaddons.module.security.facets.TenantedAuthorizationFacetDefault.hides(org.apache.isis.core.metamodel.interactions.VisibilityContext? extends org.apache.isis.applib.events.VisibilityEvent) line: 71 org.apache.isis.core.metamodel.interactions.InteractionUtils.isVisibleResult(org.apache.isis.core.metamodel.facetapi.FacetHolder, org.apache.isis.core.metamodel.interactions.VisibilityContext?) line: 40 org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl(org.apache.isis.core.metamodel.specloader.specimpl.ObjectMemberAbstract).isVisibleResult(org.apache.isis.core.commons.authentication.AuthenticationSession, org.apache.isis.core.metamodel.adapter.ObjectAdapter, org.apache.isis.applib.annotation.Where) line: 238 org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl(org.apache.isis.core.metamodel.specloader.specimpl.ObjectMemberAbstract).isVisible(org.apache.isis.core.commons.authentication.AuthenticationSession, org.apache.isis.core.metamodel.adapter.ObjectAdapter, org.apache.isis.applib.annotation.Where) line: 233 org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(org.apache.isis.core.metamodel.adapter.ObjectAdapter, org.apache.isis.core.metamodel.spec.feature.ObjectMember) line: 680 org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(org.apache.isis.core.metamodel.adapter.ObjectAdapter, java.lang.Object[], org.apache.isis.core.metamodel.spec.feature.ObjectAction, org.apache.isis.core.metamodel.specloader.specimpl.ContributeeMember) line: 607 org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) line: 263 org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.Object[]) line: 72 com.tellmegen.domain.model.traits.Trait_$$_jvstd14_7.upsertScoringRange(java.lang.Integer, java.lang.Integer, java.lang.String) line: not available com.tellmegen.integtests.domain.model.algorithms.traits.TraitLogicalAlgorithmImplementationTests.outcome_higherLimitIncluded() line: 127 sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method] sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 57 sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 43 java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 606 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall() line: 50 org.junit.runners.model.FrameworkMethod$1(org.junit.internal.runners.model.ReflectiveCallable).run() line: 12 org.junit.runners.model.FrameworkMethod.invokeExplosively(java.lang.Object, java.lang.Object...) line: 47 org.junit.internal.runners.statements.InvokeMethod.evaluate() line: 17 org.junit.internal.runners.statements.RunBefores.evaluate() line: 26
Caching Actions by simply using an annotation (param)
Hi all. We currently have available the org.apache.isis.applib.services.queryresultscache.QueryResultsCache” service to cache the result of an Action invocation for the same transation. So if we call a SAFE action that is costly to be computed, many times during the same transaction, it’s only computed once, as the 2nd time and so on the result will be obtained from a LocalThread cache. Current usage idiom is something like: // {{ relevantSnpGenotypes (programmatic - cached) @Override @Action(semantics = SemanticsOf.SAFE) public SortedSetIESG relevantSnpGenotypes(final IE inputElement, final Kit kit) { return this.queryResultsCache.execute(new CallableSortedSetIESG() { @Override public SortedSetIESG call() throws Exception { if (kit != null) { return kit.findAllAssociatedSNPGenotypesForInputElement(inputElement, AlgorithmImplementation.this.IESGClass); } else { return Sets.newTreeSet(); } } }, Kit.class, relevantSnpGenotypes, inputElement, kit); } // }} // {{ injected: QueryResultsCache @Inject protected QueryResultsCache queryResultsCache; // }} But perhaps would it be possible to ease its usage by means of an annotation ? Something like: @Action(semantics = SemanticsOf.SAFE, cacheResults = true) If so, the usage idiom would change to simply the action’s code, as the one responsible for caching could be a Facet, for example? // {{ relevantSnpGenotypes (programmatic - cached) @Override @Action(semantics = SemanticsOf.SAFE, cacheResults = true) public SortedSetIESG relevantSnpGenotypes(final IE inputElement, final Kit kit) { if (kit != null) { return kit.findAllAssociatedSNPGenotypesForInputElement(inputElement, AlgorithmImplementation.this.IESGClass); } else { return Sets.newTreeSet(); } } // }} Just to know others opinion about if it has sense and if it would be possible. I’m pretty sure this would be one of those “killer functions” for complex Domains that would appear on a summary list, despite being currently being available. Thanks! Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: Fixture Scripts - Invoking WrapperFactory.wrap() in actions
Hi Dan. I’m not sure how to use the SudoService inside a FixtureScript. I have the following: public class DemoWithAllRecordsFixture extends FixtureScript { public DemoWithAllRecordsFixture() { this.withDiscoverability(Discoverability.DISCOVERABLE); } @Override protected void execute( final ExecutionContext executionContext) { executionContext.executeChild(this, new ExcelInheritedConditionsSNPGenotypeFixture()); executionContext.executeChild(this, new ExcelDrugsSNPGenotypeFixture()); executionContext.executeChild(this, new ExcelTraitsSNPGenotypeFixture()); } The ExcelInheritedConditionsSNPGenotypeFixture contains many wrapped action invocations, so the following exception is thrown: Caused by: org.apache.isis.applib.services.wrapper.HiddenException: Reason: Could not locate application user for initialisation. Identifier: com.tellmegen.domain.model.inheritedconditions.InheritedCondition#upsertSNPGenotype(java.lang.Integer,com.tellmegen.domain.model.AppliesToSex,java.lang.String,java.lang.String,com.tellmegen.domain.model.inheritedconditions.InheritedConditionHeredity,com.tellmegen.domain.model.inheritedconditions.InheritedConditionPhenotype,com.tellmegen.domain.model.inheritedconditions.InheritedConditionStatus,java.lang.String,java.lang.String) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.toException(DomainObjectInvocationHandler.java:732) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.notifyListenersAndVetoIfRequired(DomainObjectInvocationHandler.java:700) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(DomainObjectInvocationHandler.java:682) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:607) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:263) at org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:72) at com.tellmegen.domain.model.inheritedconditions.InheritedCondition_$$_jvstcc_7.upsertSNPGenotype(InheritedCondition_$$_jvstcc_7.java) at com.tellmegen.domain.model.importing.ImportInheritedConditionSNPGenotype.saveToDatabase(ImportInheritedConditionSNPGenotype.java:244) at com.tellmegen.domain.model.importing.ImportInheritedConditionsSNPGenotypeService.importInheritedConditionsSNPGenotypes(ImportInheritedConditionsSNPGenotypeService.java:38) at com.tellmegen.fixture.model.inheritedconditionsnpgenotype.ExcelInheritedConditionsSNPGenotypeFixture.execute(ExcelInheritedConditionsSNPGenotypeFixture.java:24) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:549) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildT(FixtureScript.java:528) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildT(FixtureScript.java:498) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChild(FixtureScript.java:487) at com.tellmegen.fixture.TellMeGenDemoWithAllRecordsFixture.execute(TellMeGenDemoWithAllRecordsFixture.java:34) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:549) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$0(FixtureScript.java:546) at org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:719) at org.apache.isis.applib.fixturescripts.FixtureScript.install(FixtureScript.java:814) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixture(FixturesInstallerDelegate.java:205) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixtureInTransaction(FixturesInstallerDelegate.java:171) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixtures(FixturesInstallerDelegate.java:158) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixtures(FixturesInstallerDelegate.java:138) at org.apache.isis.core.runtime.fixtures.FixturesInstallerAbstract.installFixtures(FixturesInstallerAbstract.java:42) at org.apache.isis.core.runtime.systemusinginstallers.IsisSystemAbstract.installFixturesIfRequired(IsisSystemAbstract.java:85) at org.apache.isis.core.runtime.system.IsisSystemFixturesHookAbstract.init(IsisSystemFixturesHookAbstract.java:128) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
Re: integ test estatio
I sometimes see the abstract class error when it has not been properly enhanced after making changes on the “dom” module. HTH, Oscar El 1/5/2015, a las 17:33, Dan Haywood d...@haywood-associates.co.uk escribió: oh yeah, I remember that. Indeed. On 1 May 2015 at 16:32, johandoornen...@filternet.nl wrote: Tnx Dan, I will look into that. It has the characteristics of an incomplete metamodel I encountered before in Matching App Hard to say without more information, Johan. Double check that the RegisterEntities key in isis.properties specifies all the packages where your domain objects live. We introduced this to provide a hint to DN so that it would be able to eagerly build its metamodel; we found that sometimes if we made it lazy then we'd get odd errors. Another thing you can do is to add dummy @Hidden actions on a repository that surface all subtypes of entities; this is actually what we used to do before RegisterEntities so perhaps do this first (I also have a sneaking suspicion that RegisterEntities might perhaps be broken, need to investigate). Of course, all the above might be a wild good chase... but it's seeing DN complain that it can't instantiate an abstract class that makes me think that its metamodel is somehow incomplete... HTH Dan On 1 May 2015 at 14:57, wrote: When running integration tests in estatio I get. But sometimes it does run. Is this a datanucleus problem or am I missing something? grtz Johan 15:55:14,224 [IsisTransaction main INFO ] abort transaction IsisTransaction@10f125e5[state=MUST_ABORT,commands=0] javax.jdo.JDOFatalInternalException: Cannot instantiate abstract class. at org.estatio.dom.EstatioDomainObject.dnNewInstance(EstatioDomainObject.java) at org.datanucleus.state.StateManagerImpl.saveFields(StateManagerImpl.java:672) at org.datanucleus.state.StateManagerImpl.initialiseForPersistentNew(StateManagerImpl.java:420) at org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForPersistentNew(JDOStateManagerForIsis.java:87) at org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForPersistentNew(JDOStateManagerForIsis.java:33) at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:218) at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:1999) at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:1843) at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1698) at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:720) at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:745) at org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:363) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:357) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:521) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:467) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:392) at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:238) at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:265) at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.allMatches(DomainObjectContainerDefault.java:546) at org.apache.isis.applib.AbstractContainedObject.allMatches(AbstractContainedObject.java:170) at org.estatio.dom.UdoDomainRepositoryAndFactory.allMatches(UdoDomainRepositoryAndFactory.java:69) at org.estatio.dom.asset.Units.findByProperty(Units.java:100) at org.estatio.dom.budget.BudgetKeyTable.generateBudgetKeyItems(BudgetKeyTable.java:298) at org.estatio.fixture.budget.BudgetKeyTableAbstact.createBudgetKeyTable(BudgetKeyTableAbstact.java:47) at org.estatio.fixture.budget.BudgetKeyTableForOxf.execute(BudgetKeyTableForOxf.java:49) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:549) at
Re: tellmeGen - Datanucleus 4 issue
Hi, Dan and Carlos. I’ve just committed on Carlos project different issues found when migrating to DN4. Summarizing: - OIDImpl DN3 class has been replaced by DatastoreIdImpl DN4 class. - DN4 verifies and creates @Unique constraints. Seems DN3 didn’t support them well. - I had a test not passing due to a managed 1-n relationship not updating the collection side. Finally I’ve decided to simply add to the collection, in addition to execute the setXX(…) and the getContainer().flush() method (to force DN to manage relationships). But not sure if this is a more generic issue with DN4 regarding managed relationships (or simply some hidden error on our domain) ... @Dan If you have time, please, verify the commits made. But currently compiling and all tests passing again, so I would propose to merge with master. Thanks, Oscar El 28/4/2015, a las 10:37, Carlos carlos.sanc...@tellmegen.com escribió: Hi Dan! Thank you very much! I will create a new branch named DN4issue in order you can fight with the problem :) Regards, Carlos. PS: Subscribed! (Forgot to send email confirmation hehe) Director de sistemas informáticos Calle Arquitecto mora 5, puerta 4 46022, Valencia Tlf: +34 669 70 20 05 El 28 de abril de 2015 a las 10:26 Dan Haywood d...@haywood-associates.co.uk escribió: Hi Carlos I'll take a look this evening, see if I can provide a bit of guidance. Could you commit to a branch so I can pull down the version of the app with the problem? Cheers Dan PS: could you subscribe to this mailing list so I don't have to manually approve your posts? thx. On 28 April 2015 at 09:19, Carlos carlos.sanc...@tellmegen.com mailto:carlos.sanc...@tellmegen.com wrote: Hello, Saturday I installed last ISIS version with DN4 and now I have some problems using import org.datanucleus.identity.OIDImpl; (It does not exits in new version I think) and if I comment it I get this error: Error: Could not find or load main class org.datanucleus.enhancer.DataNucleusEnhancer Thanks very much. Regards, Carlos. Director de sistemas informáticos Calle Arquitecto mora 5, puerta 4 46022, Valencia Tlf: +34 669 70 20 05 tel:%2B34%20669%2070%2020%2005 Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
PermGen errors always on wrappers
Hi, all. After upgrading to latest Isis release we have quite tests that were previously running smoothly, but currently end with PermGen errors, originated always on wrappers. You must consider that we have nearly all action calls invoked through wrappers, and most setters also (that way we ensure that validateXXX methods, etc. that can hold business logic are always executed; if not possible due tu visibility restrictions we execute them insider a wrapNoExecute(…) call). For example, this a stack trace we obtain. We can add PermGen executing with: -Xmx1G -XX:MaxPermSize=512M But it will fail again, perhaps some more tests later. Perhaps there can be some memory loss: - when wrapping (or if, when an action invocation is wrapped, if there are many wrapped calls also) ? - if a test does not complete successfully? There can be other external factors to consider (like importing Excel files through Apache POI), but I wanted to point it here. I’ve attached 2 sample logs: LOG 1 (executing a test with -XX:MaxPermSize=256) java.lang.RuntimeException: by java.lang.OutOfMemoryError: PermGen space at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:174) at org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist.createEnhancedClass(ProxyInstantiatorForJavassist.java:74) at org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist.instantiateProxy(ProxyInstantiatorForJavassist.java:47) at org.apache.isis.core.wrapper.handlers.ProxyContextHandler.proxy(ProxyContextHandler.java:57) at org.apache.isis.core.wrapper.WrapperFactoryAbstract.createProxy(WrapperFactoryAbstract.java:224) at org.apache.isis.core.wrapper.WrapperFactoryAbstract.wrap(WrapperFactoryAbstract.java:220) at org.apache.isis.core.wrapper.WrapperFactoryAbstract.wrap(WrapperFactoryAbstract.java:196) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObject.wrap(AbstractXMSDomainObject.java:420) at com.xms.framework.risk.domain.model.Event.addEventCatalog(Event.java:405) at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:337) at org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:189) at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57) at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:1) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:205) at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54) at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:367) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:610) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:244) at org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52) at com.xms.framework.risk.domain.model.Event_$$_javassist_593.addEventCatalog(Event_$$_javassist_593.java) at com.xms.framework.risk.domain.model.EventAPIService.upsertEvent(EventAPIService.java:209) at com.xms.framework.risk.domain.model.EventAPIService.importEventsFromExcel(EventAPIService.java:160) at com.xms.framework.risk.domain.model.EventAPIService.importEventsFromExcel(EventAPIService.java:48) at com.xms.framework.risk.domain.model.Events.createThreatsForMAGERIT(Events.java:130) at com.xms.framework.risk.integration.tests.EventCatalogsTests.testCreateThreatsForMAGERIT(EventCatalogsTests.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at
Re: Unable to re-create a view model
Hi all. One of the properties is another View Model. El 9/2/2015, a las 15:40, Martin Grigorov mgrigo...@apache.org escribió: On Mon, Feb 9, 2015 at 4:35 PM, Dan Haywood d...@haywood-associates.co.uk wrote: My guess, then, is that the @ViewModel isn't handling references to other view models. I suspect that anything that isn't a simple value (int, string, date etc) is being processed as an entity, and a bookmark is being created for it. But on rehydration this bookmark is converted to an oid and then being (incorrectly) given to the JDO object store. This is correct! I've seen in the stacktrace a code that looks up: propertyId + .bookmark. If I'm right, hopefully is fixable. Feel free to take a look in the ViewModelFacet implementations, see what you can make of it. The workaround is for the view model object to explicitly implement ViewModel, and return a memento; ie handle the viewmodel - viewmodel reference manually. HTH Dan On 9 February 2015 at 14:30, Martin Grigorov mgrigo...@apache.org wrote: Hi Dan, The commit was a minor optimization. The problem is still there. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Feb 9, 2015 at 4:20 PM, Dan Haywood d...@haywood-associates.co.uk wrote: Hi Martin, I saw a commit from you on JdoObjectIdSerializer following on from this mail, so did you sort out the issue (or do I need to take a look tonight?) Cheers Dan On 9 February 2015 at 08:17, Martin Grigorov mgrigo...@apache.org wrote: Hi, What could be the reason a ViewModel cannot be recreated with the exception below ? Looking at org.apache.isis.objectstore.jdo.datanucleus.persistence.spi.JdoObjectIdSerializer#toJdoObjectId() it tries to find '_' separator and use the string before it to decide what class to load (byte, int, UUID, ...). In my case the ViewModel extends from an abstract ViewModel. The parent one is annotated with @ViewModel and the child one with @DomainObject(nature = Nature.VIEW_MODEL). I've tried different combinations with the annotations but it always leads to this exception. Caused by: org.apache.isis.core.runtime.persistence.PojoRecreationException: Could not recreate pojo for oid oid KIVM:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PGtpdC5ib29rbWFyaz5LSVRfOkxfMTwva2l0LmJvb2ttYXJrPjxpbnB1dEVsZW1lbnQuYm9va21hcms-SU5IRVJJVEVEX0NPTkRJVElPTjpMXzE0MzwvaW5wdXRFbGVtZW50LmJvb2ttYXJrPjwvbWVtZW50bz4= at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:320) at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:305) at org.apache.isis.core.runtime.persistence.container.DomainObjectContainerResolve.adapterFor(DomainObjectContainerResolve.java:104) at org.apache.isis.core.runtime.persistence.container.DomainObjectContainerResolve.lookup(DomainObjectContainerResolve.java:55) at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.lookup(RuntimeContextFromSession.java:211) at org.apache.isis.core.metamodel.services.bookmarks.BookmarkServiceDefault.lookup(BookmarkServiceDefault.java:59) at org.apache.isis.core.metamodel.facets.object.recreatable.RecreatableObjectFacetDeclarativeAbstract.initialize(RecreatableObjectFacetDeclarativeAbstract.java:89) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorDefault.recreatePojo(PojoRecreatorDefault.java:49) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorForDataNucleus.recreatePojo(PojoRecreatorForDataNucleus.java:34) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorUnified.recreatePojo(PojoRecreatorUnified.java:38) at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:317) ... 54 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1958) at org.apache.isis.objectstore.jdo.datanucleus.persistence.spi.JdoObjectIdSerializer.toJdoObjectId(JdoObjectIdSerializer.java:112) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.loadPojo(DataNucleusObjectStore.java:410) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorForDataNucleus.recreatePojo(PojoRecreatorForDataNucleus.java:36) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorUnified.recreatePojo(PojoRecreatorUnified.java:38) at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:317) ... 64 more Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov
Re: Unable to re-create a view model
) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorUnified.recreatePojo(PojoRecreatorUnified.java:38) at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:317) El 9/2/2015, a las 15:48, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Hi all. One of the properties is another View Model. El 9/2/2015, a las 15:40, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org escribió: On Mon, Feb 9, 2015 at 4:35 PM, Dan Haywood d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk wrote: My guess, then, is that the @ViewModel isn't handling references to other view models. I suspect that anything that isn't a simple value (int, string, date etc) is being processed as an entity, and a bookmark is being created for it. But on rehydration this bookmark is converted to an oid and then being (incorrectly) given to the JDO object store. This is correct! I've seen in the stacktrace a code that looks up: propertyId + .bookmark. If I'm right, hopefully is fixable. Feel free to take a look in the ViewModelFacet implementations, see what you can make of it. The workaround is for the view model object to explicitly implement ViewModel, and return a memento; ie handle the viewmodel - viewmodel reference manually. HTH Dan On 9 February 2015 at 14:30, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org wrote: Hi Dan, The commit was a minor optimization. The problem is still there. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov https://twitter.com/mtgrigorov On Mon, Feb 9, 2015 at 4:20 PM, Dan Haywood d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk wrote: Hi Martin, I saw a commit from you on JdoObjectIdSerializer following on from this mail, so did you sort out the issue (or do I need to take a look tonight?) Cheers Dan On 9 February 2015 at 08:17, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org wrote: Hi, What could be the reason a ViewModel cannot be recreated with the exception below ? Looking at org.apache.isis.objectstore.jdo.datanucleus.persistence.spi.JdoObjectIdSerializer#toJdoObjectId() it tries to find '_' separator and use the string before it to decide what class to load (byte, int, UUID, ...). In my case the ViewModel extends from an abstract ViewModel. The parent one is annotated with @ViewModel and the child one with @DomainObject(nature = Nature.VIEW_MODEL). I've tried different combinations with the annotations but it always leads to this exception. Caused by: org.apache.isis.core.runtime.persistence.PojoRecreationException: Could not recreate pojo for oid oid KIVM:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PGtpdC5ib29rbWFyaz5LSVRfOkxfMTwva2l0LmJvb2ttYXJrPjxpbnB1dEVsZW1lbnQuYm9va21hcms-SU5IRVJJVEVEX0NPTkRJVElPTjpMXzE0MzwvaW5wdXRFbGVtZW50LmJvb2ttYXJrPjwvbWVtZW50bz4= at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:320) at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:305) at org.apache.isis.core.runtime.persistence.container.DomainObjectContainerResolve.adapterFor(DomainObjectContainerResolve.java:104) at org.apache.isis.core.runtime.persistence.container.DomainObjectContainerResolve.lookup(DomainObjectContainerResolve.java:55) at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.lookup(RuntimeContextFromSession.java:211) at org.apache.isis.core.metamodel.services.bookmarks.BookmarkServiceDefault.lookup(BookmarkServiceDefault.java:59) at org.apache.isis.core.metamodel.facets.object.recreatable.RecreatableObjectFacetDeclarativeAbstract.initialize(RecreatableObjectFacetDeclarativeAbstract.java:89) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorDefault.recreatePojo(PojoRecreatorDefault.java:49) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorForDataNucleus.recreatePojo(PojoRecreatorForDataNucleus.java:34) at org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorUnified.recreatePojo(PojoRecreatorUnified.java:38) at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:317) ... 54 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1958) at org.apache.isis.objectstore.jdo.datanucleus.persistence.spi.JdoObjectIdSerializer.toJdoObjectId(JdoObjectIdSerializer.java:112
Re: Considering merging the Wicket viewer into Core framework
ok for me also. Cheers, Oscar El 3/2/2015, a las 15:23, Kevin Meyer ke...@kmz.co.za escribió: No objections from me. Cheers, Kevin On 2 February 2015 23:24:32 CET, Dan Haywood d...@haywood-associates.co.uk wrote: Hi folks, Over the last few releases we've been slowly rationalizing the various Maven modules, and for 1.8.0 I'd like to go one further step and merge the Wicket viewer into core also. * it's the defacto (human usable) UI for Isis * the use cases that it supports are to a large extent driving the evolution of Isis' metamodel * it simplifies the release process (hopefully will encourage us committers to do more frequent releases) From a user (ie programmer) perspective, the impact will be that some of the Maven dependencies will change. We'll update the archetypes though to make it easy to see the changes. I'll leave this thread open a few days to allow opinions to be aired; if I hear nothing then will assume lazy consensus. Thx Dan -- Sent from my phone with K-9 Mail. Please excuse my brevity. Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: LocalDate UI (datepicker issue) in 1.8.0-Snapshot
Yes, it was my fault. Maven referenced the Isis snapshot on my workspace, and it was not updated since 16th January. Thanks again, Martin!!!
Re: LocalDate UI (datepicker issue) in 1.8.0-Snapshot
Yes, it was my fault. Maven referenced the Isis snapshot on my workspace, and it was not updated since 16th January. Thanks again, Martin!!!
Re: LocalDate UI (datepicker issue) in 1.8.0-Snapshot
Hi, Martin. I can share my screen through Hangouts. I'm connected right now, or tomorrow morning I'll be available also, if you find it useful. Thanks, Oscar El 31/1/2015, a las 21:52, Martin Grigorov mgrigo...@apache.org escribió: No luck! I've added -Duser.language=es -Duser.country=ES to my VM properties, and I've switched my browser locale to German, Polish and Chinese. The date picker works as desired with all combinations. http://momentjs.com/docs/#/i18n/ http://momentjs.com/docs/#/i18n/ explains how to change the locale, so I've tried moment.locale(es) in the F12 Dev console but the output was en. And this is expected because Isis doesn't provide custom locales for Moment.js, so only the default EN is available. Any hints how to reproduce are welcome! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov https://twitter.com/mtgrigorov On Sat, Jan 31, 2015 at 10:41 PM, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org wrote: And a second later I realized that I've reverted Person class to its original version before trying with the disabled #disabled(). Now I can edit the date field and all seems OK. I guess it is related to the locale Moment.js uses. I use en_US and I guess Johan uses nl_NL, and Oscar es_ES. Trying ... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov https://twitter.com/mtgrigorov On Sat, Jan 31, 2015 at 10:36 PM, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org wrote: I've found info.matchingservice.dom.MatchingSecureMutableObject#disabled and modified it to return null, thus not disabling the entity, but still it appeats not editable in the UI... Please give more details Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov https://twitter.com/mtgrigorov On Sat, Jan 31, 2015 at 10:31 PM, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org wrote: Johan, How I can reproduce the issue ? Initially Person object appeared to be immutable in the UI, so I have removed editing=Editing.DISABLED from its @DomainObject definition. But it is still immutable, i.e. I cannot edit it. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov https://twitter.com/mtgrigorov On Sat, Jan 31, 2015 at 10:09 PM, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org wrote: I'll try Johan's app now. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov https://twitter.com/mtgrigorov On Sat, Jan 31, 2015 at 7:31 PM, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com wrote: Just to clarify it. The property is of type: java.util.Date HTH, Oscar El 31/1/2015, a las 18:30, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com escribió: Hi Martin and Johan, I have an issue perhaps related to this one. I'm working against latest SNAPSHOT (updated right now). I have the following Entity: @PersistenceCapable public class GenericOrder { // {{ OrderDate (property) private Date orderDate; @MemberOrder(sequence = 000.000.020) @Column(allowsNull = false) public Date getOrderDate() { return this.orderDate; } public void setOrderDate(final Date orderDate) { this.orderDate = orderDate; } @SuppressWarnings(static-method) public Date defaultOrderDate() { return new Date(); } // }} ... } I create instances with a factory method like this one: // {{ createGenericOrder (action) @ActionSemantics(Of.NON_IDEMPOTENT) @MemberOrder(sequence = 1) public GenericOrder createGenericOrder(@XMSActionField(locales = { @XMSLocale(locale = es, caption = Cliente) }) @Named(Customer) final Customer customer, @XMSActionField(locales = { @XMSLocale(locale = es, caption = Descripción) }) @Named(Description) @Optional final String description) { final GenericOrder genericOrder = this.newTransientMultiTenantUnnamedEntity(GenericOrder.class, null, description); this.wrap(genericOrder).setCustomer(customer); this.persist(genericOrder); return genericOrder; } And the Order.OrderDate property is properly initialized. But on the Wicket viewer I see that the date shown is 31-01-20, instead of 31-01-15. That's been when having on isis.properties: isis.value.format.date=dd-MM- If changed to: isis.value.format.date=DD-MM- There's no change, showing also 31-01-20. Thanks, Oscar El 30/1/2015, a las 16:55, Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org escribió: Johan, Do you still face the issue ? ISIS-1012 has been merged to master already. Martin Grigorov Wicket Training and Consulting https://twitter.com
Re: Workflow
Hi all, From JBoss' JBPM [1] we had a prototype of its Human Tasks module and it worked ok with version 5.4, not latest version 6.x (which changes noticeably the API). On version 6 the whole platform has improved a lot and includes really polished UI BPMN 2.0 designers, form editors, dashboards and others (see [1] carousel tabs). Perhaps it's not as easy to start with as Camunda/Activiti, but not sure (we initially evaluated Activiti, but it was on its early days, and JBPM was really complete and with higher support). But what we've been using extensively is the JBoss Drools [2] business rules platform for accessing an Apache Isis domain and it works really good. Our main use case needed a CEP (Complex Event Processing) engine, and it's fully integrated with JBPM. Our intention is to keep with the JBoss stack by now (mainly due to the CEP platform). HTH, Oscar [1] http://www.jbpm.org/ [2] http://www.drools.org/ El 7/1/2015, a las 15:16, augustinus.dei...@telekom.de augustinus.dei...@telekom.de escribió: Hi Jeremy, I used Activiti some time ago in a prototypical implementation together with Isis. It was easy to use - especially one can test the workflows easily cause it has JUnit test support. (One can start the engine embedded - it is simple an additional jar) However I'd propose camunda-BPM - as mentioned below - cause it is a fork and more active. The processes (.xml-files) can be created by any tool which creates the BPMN 2.0 standard. The start of a process could be an isis-service to separate out the long running behaviour. My dream-team would be Apache Isis + Apache Camel (for Integration Purposes) + camunda BPM But I don't have deep experience with all that tools. As far as I now camunda comes with an online-editor for the processes. As a modeling tool you could take http://sourceforge.net/projects/bpmn/ too But you should look at a process (.xml-file) as being source-code to be tested like any other source-code! (The engine is just an interpreter somehow.) The person updating the process-file should be within IT Augustinus -Ursprüngliche Nachricht- Von: Branham, Jeremy [HR] [mailto:jeremy.d.bran...@sprint.com] Gesendet: Dienstag, 6. Januar 2015 19:26 An: users@isis.apache.org Betreff: RE: Workflow Hi Erik/Chris - Thanks for the direction. I've heard of Activiti but haven't worked with it yet. Leveraging a specialized for workflow could have some added benefits with a good integration in Apache Isis. In particular, it would be nice to give the domain experts a way to update workflow behavior without involving a developer. Jeremy D. Branham Tel: **DOTNET -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, January 06, 2015 3:41 AM To: users@isis.apache.org Subject: RE: Workflow Also take a look at Camunda - a fork of Activiti by the main Activiti lead dev. -Original Message- From: Erik de Hair [mailto:e.deh...@pocos.nl] Sent: Tuesday, 6 January 2015 7:07 PM To: users@isis.apache.org Subject: Re: Workflow Hi Jeremy, I've been playing around with Activiti [1]. I thought it would be better to use an existing specialized package instead of designing my own workflow model and implement it. I've create a proof of concept with several flows and tasks and it does work, but it looks like there's still a lot of work to do for interfacing my domain model with the workflow-system (coupling flows/tasks to my entities, writing Activiti-queries, creating view models). I'm new to Activiti (or other workflow components) and my progress isn't that much yet, but I'll let you know if anything interesting pops up. Erik [1] http://activiti.org/ On 01/05/2015 08:43 PM, Branham, Jeremy [HR] wrote: Is anyone using a workflow component in their Isis app? JBPM? Or do you represent workflow as behaviors in the domain? What has your experience been? Thanks! Jeremy D. Branham Technology Architect This e-mail may contain Sprint proprietary information intended for the sole use of the recipient(s). Any use by others is prohibited. If you are not the intended recipient, please contact the sender and delete all copies of the message. This e-mail may contain Sprint proprietary information intended for the sole use of the recipient(s). Any use by others is prohibited. If you are not the intended recipient, please contact the sender and delete all copies of the message. Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com
Re: ISIS-970 ... (new annotations) please review if you get a chance...
. com.mycompany.myapp.pd.*com.mycompany.myapp.ui.* David. On Thursday, 1 January 2015 3:24 AM, Branham, Jeremy [HR] jeremy.d.bran...@sprint.com wrote: What would it look like with @Model? Giving more specificity than ‘Object’ but opening the interpretation to Entities and ViewModels. Or am I overlooking something? [I am new to Isis] (fyi - there is a name clash with Model in Spring-MVC) Jeremy D. Branham Tel: **DOTNET From: Jeroen van der Wal [mailto:jer...@stromboli.it] Sent: Wednesday, December 31, 2014 7:37 AM To: dev; users Subject: Re: ISIS-970 ... (new annotations) please review if you get a chance... I like this discussion because it's defining where Apache Isis is right now. Personally I think Isis has grown far beyond the concepts of DDD so sticking to it's grammar would limit ourselves. In the applications I'm developing things aren't black or white: we have view models that represent documents in a CMIS document store but in DDD terms they are domain entities. We have view models that are based on entries in a database view but in DDD terms these are domain entities. We have view models that are created on the fly and never get persisted but in DDD terms they are domain entities. As you might expect I opt to simply call everything a domain object. Residing in the application's domain object model. Very easy to explain to newcomers too. Cheers, Jeroen On Wed, Dec 31, 2014 at 1:13 PM, GESCONSULTOR - Óscar Bou o@gesconsultor.commailto:o@gesconsultor.com wrote: Hi to all. I'm thinking about it but still convinced of option 1 ... In my opinion, annotations are going to be our main API. So they must be thought from the user's perspective, more than from the implementation's perspective. In that way, aligning with DDD concepts (that are the most widely spread) is more important to me than implementation criteria. So I would keep my vote for implementing: @DomainEntity @ViewModel @DomainEntityLayout @ViewModelLayout Regarding adding the Domain preffix to properties and collections, I think it's not needed. As Dan's exposed, they are present on any type of class (despite being a domain or application level one). As they're annotations an not classes, in my current setup (based on Apache Isis latest snapshot): - @Property does not conflict with any other annotation (i.e., no identically named annotation is present on any dependency). - @Collection does not conflict with any other annotation. - @Action clashes with the javax.xml.ws.Action annotation. - @Parameter clashes with the org.junit.runners.parammetrized.Parameter annotation. None of them can be confused with Isis ones by a junior developer. In fact, this clash conflict was already present with @Named (that it's going to be kept) and same other Apache Isis annotations without being more relevant. So my opinion would be to not add the Domain prefix to them. Perhaps this could also be a good moment to add a collateral debate :) In my head, I also associate Collections with Properties. I would consider Simple Properties and Collection Properties. So perhaps naming could be instead SimpleProperty and CollectionProperty ? :-)) HTH, Oscar El 31/12/2014, a las 12:39, Vladimir Nišević vnise...@gmail.commailto:vnise...@gmail.com escribió: I would vote for most well described DDD terms (described in Evans book) - this would help users to adopt/understand ISIS framework easier and have a kind of reference documentation. Term 'Object' is too general, and Business Object modelling antipatterns are also very wide spreaded, e.g. by people like enterpise information modelling architects... Regs, Vladimir Am 31.12.2014 um 07:40 schrieb Dan Haywood d...@haywood-associates.co.ukmailto:d...@haywood-associates.co.uk: On 30 December 2014 at 23:44, David Tildesley davo...@yahoo.co.nzmailto:davo...@yahoo.co.nz wrote: +1 for the counter proposal (although I would suggest cloning/deriving @DomainObjectLayout to @ViewModelLayout etc. so that Domain* tags are not used in ViewModel - less confusing). On a different thread to dev@ I also made a related proposal that @Property, @Collection, @Action etc be renamed to @DomainProperty, @DomainCollection, @DomainAction etc... the primary reason being that clashes with @Collection clashes with java.util.Collection, plus I like the idea of all Isis-related annotations starting with an @DomainXxx prefix. No one's commented on that, yet. Given your preference of @ViewModel and reserving @Domain to be strictly for domain layer concepts, would I be right to guess you wouldn't be in favour of adding Domain as a prefix to all those annotations? On Tuesday, 30 December 2014 3:07 AM, Dan Haywood d...@haywood-associates.co.ukmailto:d...@haywood-associates.co.uk wrote: On 29 December 2014 at 13:23
Re: Exception on latest snapshot when executing this.wrapperFactory.wrap()
I've not enabled anything related to security. Just downloaded the simple archetype 3-4 weeks ago. Are there any steps to follow? Thanks, Oscar El 15/12/2014, a las 11:15, Dan Haywood d...@haywood-associates.co.uk escribió: Have you enabled security also? The exception stack trace includes: org.apache.isis.applib.services.wrapper.HiddenException: Reason: Not authorized to view. Identifier: com.tellmegen.domain.model.Account#name() Initialization is performed using a special user (I think it's called initialization or something); I'm guessing you'll need to give that special account permissions? Let us know if that helps Cheers Dan On 15 December 2014 at 09:42, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Hi to all. I've started some work using the latest snapshot. I was used to invoke all setters inside a wrapperFactory.wrap(domainObject).setXXX() in order to always force execution of domain logic placed inside the validateXXX, hiddenXXX, disabledXXX, modifyXXX, clearXXX, etc. methods. But on this new project an exception is thrown. Seems some initialization is missing? Perhaps WrapperFactory cannot be used inside FixtureScripts? Thanks, Oscar ... 10:13:37,344 [Native main DEBUG] INSERT INTO DiseaseSNPGenotype (description,orRatioPreffix,confidence,snpDisease_id_OID,orRatioFactor,genotype,version) VALUES ('description','TD',1,2,0.80,'TT',1) 10:13:37,345 [Native main DEBUG] UPDATE DiseaseSNP SET version=2 WHERE id=2 account-with-users-and-diseases-fixture/account-fixture : EXEC fixture.tellmegen.AccountFixture 10:13:37,390 [FixturesInstallerDelegate main ERROR] installing fixture fixture.tellmegen.AccountWithUsersAndDiseasesFixture failed; aborting org.apache.isis.applib.services.wrapper.HiddenException: Reason: Not authorized to view. Identifier: com.tellmegen.domain.model.Account#name() at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.toException(DomainObjectInvocationHandler.java:642) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.notifyListenersAndVetoIfRequired(DomainObjectInvocationHandler.java:610) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(DomainObjectInvocationHandler.java:594) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleSetterMethodOnProperty(DomainObjectInvocationHandler.java:372) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:201) at org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52) at com.tellmegen.domain.model.Account_$$_javassist_4.setName(Account_$$_javassist_4.java) at com.tellmegen.domain.model.Accounts.createAccount(Accounts.java:27) at fixture.tellmegen.AccountFixture.execute(AccountFixture.java:18) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:358) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$0(FixtureScript.java:355) at org.apache.isis.applib.fixturescripts.FixtureScript.executeChild(FixtureScript.java:494) at org.apache.isis.applib.fixturescripts.FixtureScript.executeChild(FixtureScript.java:516) at fixture.tellmegen.AccountWithUsersAndDiseasesFixture.execute(AccountWithUsersAndDiseasesFixture.java:21) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:358) at org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$0(FixtureScript.java:355) at org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:442) at org.apache.isis.applib.fixturescripts.FixtureScript.install(FixtureScript.java:545) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixture(FixturesInstallerDelegate.java:205) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixtureInTransaction(FixturesInstallerDelegate.java:171) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixtures(FixturesInstallerDelegate.java:158) at org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate.installFixtures(FixturesInstallerDelegate.java:138) at org.apache.isis.core.runtime.fixtures.FixturesInstallerAbstract.installFixtures(FixturesInstallerAbstract.java:42) at org.apache.isis.core.runtime.systemusinginstallers.IsisSystemAbstract.installFixturesIfRequired(IsisSystemAbstract.java:85) at org.apache.isis.core.runtime.system.IsisSystemFixturesHookAbstract.init(IsisSystemFixturesHookAbstract.java:124
Re: Showing action results as tabs attached to entity pages
Hi to all. I've uploaded some screenshots. I'm going to explain different behaviors or implementation alternatives that perhaps are of interest, including the ones exposed on previous posts on this thread. On [1], you can see the general current appearance of our entity forms. Perhaps we wouldn't choose the toolbar paradigm right now, but it allows to keep all forms with similar lookfeel and a predefined set of actions defined. The green menu button contains menu items for all factory methods of the current entity. The grey one contains the available actions detected through Isis metadata. I'll explain on a coming thread an alternative implementation for default entity delete and collection remove actions. As you can see, there are 2 different rows of tabs: the outer ones (Contributed Tabs) and the inner ones (Views). *** ENTITY VIEWS *** On screenshot [2] I've identified the inner tabs. Those are automatically generated as a complement to sections. We call them Views. That way, we can divide entity properties and collections not only in sections, but also on different views. There's always a General view present by default. The annotations for Entities (@XMSViews) Property (@XMSInViews - same property/collection could be shown in more than one view) can be used as in this example: @XMSViews({ @XMSView(name = Dependency Assets, sequence = 110), @XMSView(name = Impacted Assets, sequence = 120), @XMSView(name = Associated Costs, sequence = 130) }) public abstract class Asset extends AbstractMultiTenantEntity { // {{ RelationshipsWithDirectlyImpactedAssets (Collection) @Persistent(mappedBy = sourceAsset, dependentElement = false) private SortedSetRelationship relationshipsWithDirectlyImpactedAssets = new TreeSetRelationship(); @Named((SUMMARY) Relationships - Directly Impacted Assets) @XMSInViews(Impacted Assets, Other View) @MemberOrder(sequence = 999) public SortedSetRelationship getRelationshipsWithDirectlyImpactedAssets() { return this.relationshipsWithDirectlyImpactedAssets; } public void setRelationshipsWithDirectlyImpactedAssets(final SortedSetRelationship relationshipsAsSource) { this.relationshipsWithDirectlyImpactedAssets = relationshipsAsSource; } // }} ... } *** CONTRIBUTED VIEWS *** On screenshot [3], I've identified the contributed tabs. They should the result of a contributed action on a different tab, instead of being showed as a contributed property/collection. For example, in [4] you can see the form corresponding to the Entity returned by an action that has been properly annotated on a Service with @XMSContributedView (our current implementation is a bit different, as we were including translations on them; but I've preferred to simplify). public class AssetsBCMInformation extends AbstractSingletonMultiTenantObjectRepositoryAndFactoryAssetBCMInformation { @NotContributed(As.EITHER) @DescribedAs(Contains the detailed Business Continuity Requirements for a given Asset) @ActionSemantics(Of.SAFE) @XMSContributedView public AssetBCMInformation businessContinuityInformation(@Named(Asset) final Asset asset) { ... } ... } Perhaps both Entity Contributed Views could be showed all-together on the same tab control, without requiring two tab rows. CONTRIBUTED VIEW REFERRING TO AN EXTERNAL URL *** On [5], the content of a Contributed View is an external URL (on this case is a highly customized diagram editor). Hope all this helps to clarify past posts ... :) Regards, Oscar [1] http://s23.postimg.org/ndvn4huez/Main_Form.png [2] http://postimg.org/image/xg7mbfvh9/ [3] http://postimg.org/image/ucxki507l/ [4] http://postimg.org/image/43plbkg7j/ [5] http://postimg.org/image/k83i6b70x/ El 12/12/2014, a las 15:31, GESCONSULTOR o@gesconsultor.com escribió: Ok. I'll send them this weekend. El 12/12/2014, a las 14:47, Dan Haywood d...@haywood-associates.co.uk escribió: Some screenshots/sketches would probably be useful; I'm not certain I'm following everything you're saying here. On 12 December 2014 at 13:37, GESCONSULTOR o@gesconsultor.com wrote: Also, not sure about the default... I think that they should be shown by default on the same page. At least, is our current implementation and is working nicely. Sorry ... :) El 12/12/2014, a las 14:29, Dan Haywood d...@haywood-associates.co.uk escribió: ok, yes, that helps. In which case I think that all would be required is to extend @PropertyLayout / @CollectionLayout (or equivalently .layout.json file) to specify the tab. This could apply both to regular and contributed properties and collections. I guess there could be some defaults so that contributed collections appear on different tabs by default. ~~~ One complication here is that Jeroen and I have also been (off-list) mulling over the idea of implementing bookmarks
Default implementations for Delete Entity and Collection Remove actions
There are a lot of cases where the implementation of those operations is the same, and Isis could avoid to explicitly implement it. For entities, normally is something like: public void delete(Entity entity) { this.getContainer().remove(entity); this.getContainer().flush(); } Perhaps flush can be optional, perhaps if implemented directly on the entity there shouldn't be any params, but base code remains the same. If all entities have a common descendant, it can be implemented on a generic service that accepts one instance as a param. But perhaps that basic operation could be implemented directly by the framework. Its deletion could be vetoed by means of the Isis removing() method, for example, and also by means of the EventServiceBus. Perhaps a default implementation on an Isis service could be given? But there's another case that it's polluting our domain entities and we haven't achieve a standard way to implement it, despite I think it's possible. For nearly each collection, we need: - an addXXX action (that normally accepts one existing instance of the collection elements - i.e., a Price List adding existing Items -). - sometimes, a createXXX action (that create an instance and after that calls addXXX; think of an Aggregated Root creating all contained Entity instances - i.e., an Order creating new Line Items -). - a deleteXXX action (that mainly consists of a getCollection.remove(entity); if the collection was annotated with dependentElement=true, the instance will removed AND deleted by DataNucleus after executing it). From those three, createXXX need custom business logic to work and cannot be easily generalized (createXXX needs required fields of the entity created). But addXXX and deleteXXX, when available, have a quite generic implementation: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) @Discriminator(value = BusinessService) public class InformationSystem extends ApplicationComponent { // {{ UsesSoftwareServices (Collection) @Persistent(mappedBy = usedByInformationSystem, dependentElement = false) private SortedSetSoftwareService usesSoftwareServices = new TreeSetSoftwareService(); @MemberOrder(sequence = 710) public SortedSetSoftwareService getUsesSoftwareServices() { return this.usesSoftwareServices; } public void setUsesSoftwareServices(final SortedSetSoftwareService usesSoftwareServices) { this.usesSoftwareServices = usesSoftwareServices; } // }} // {{ addSoftwareService (action) @ActionSemantics(Of.IDEMPOTENT) @MemberOrder(name = usesSoftwareServices, sequence = 010) public void addSoftwareService(@XMSBulkParam @Named(Software Service) final SoftwareService softwareService) { this.getUsesSoftwareServices().add(softwareService); this.getContainer().flush(); } // }} // {{ deleteFromUsesSoftwareServices (action) @ActionSemantics(Of.IDEMPOTENT) @MemberOrder(name = usesSoftwareServices, sequence = 020) public void deleteFromUsesSoftwareServices(@XMSBulkParam @Named(Servicio de Software) final SoftwareService softwareService) { this.getUsesSoftwareServices().remove(softwareService); this.getContainer().flush(); } // }} ... } Couldn't they be provided by default also by Isis? For example, by annotating the collection with something similar to: @Collection(addAction=Add Software Service, deleteAction=Remove Software Service) Which would reduced the code to: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) @Discriminator(value = BusinessService) public class InformationSystem extends ApplicationComponent { // {{ UsesSoftwareServices (Collection) @Persistent(mappedBy = usedByInformationSystem, dependentElement = false) private SortedSetSoftwareService usesSoftwareServices = new TreeSetSoftwareService(); @Collection(addMethodName=Add Software Service, deleteAction=Remove Software Service) @MemberOrder(sequence = 710) public SortedSetSoftwareService getUsesSoftwareServices() { return this.usesSoftwareServices; } public void setUsesSoftwareServices(final SortedSetSoftwareService usesSoftwareServices) { this.usesSoftwareServices = usesSoftwareServices; } // }} ... } If I remember it well, Martin suggested once something similar for collections. Perhaps am I missing anything not allowing such generic implementations being supported by Isis ? Regards, Oscar Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos
Re: Any opinions on this proposal (ISIS-970) to reduce the number of Isis annotations?
First thoughts here ... It seems obvious that it would be clearer and also easier to learn (as you could easily discover all property, collection or action options easily simply by looking at the possible annotation fields. That way we would be doing something equivalent to JPA or JDO, where you have a @Persistent or @Column annotation with a lot of options there. So seems a great idea ... :)) I miss name as an equivalent to @Named. El 9/12/2014, a las 21:44, Mabanga, Sizwe smaba...@wesbank.co.za escribió: see https://issues.apache.org/jira/browse/ISIS-970 Makes great sense to me. The proliferation of annotations makes my classes ugly. Surely classes can be clever and pretty? Already part way there with the new @XxxLayout (UI hint) annotations; occurred to me that might make sense to do something similar for the remaining (domain) annotations. Comment on the ticket or on this thread, whichever. Cheers Dan To read WesBank's Disclaimer for this email click on the following address or copy into your Internet browser: https://www.wesbank.co.za/wesbankcoza/about/legal/emaildisclaimer.xhtml If you are unable to access the Disclaimer, send a blank e-mail to emaildisclai...@wesbank.co.za and we will send you a copy of the Disclaimer. Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: Isis Security Addon Custom ApplicationUser
Hi, Jeroen. Looking into this thread again, I've discovered also this link [1], telling how to integrate Fortress on a Wicket app. I'm sure Martin will have interest on it :) I agree that it would be quite heavy to use a full RBAC authorization system based on LDAP. I'm going to have the opportunity yo integrate the Isis Security addon on a project soon. I'll provide feedback. Regards, Oscar [1] http://iamfortress.org/WicketRbac El 20/11/2014, a las 16:11, Jeroen van der Wal jer...@stromboli.it escribió: Martin: Thanks for the compliments and keep us updated on your progress. Oscar: Dan and I are on Holiday too: speaking at ApacheCon. Fortunately for us laptops are obliged here :-) All good stuff that you mentioned, send more when you have time, a domain model maybe. As the security module is very fresh with little users It shouldn't be hard to refactor it to accommodate more scenarios. Apache Fortress is also acting in this space but I don't want to bring in an additional component at this stage. But we might want to borrow some of their concepts. Cheers, Jeroen On Thu, Nov 20, 2014 at 2:23 PM, GESCONSULTOR o@gesconsultor.com wrote: Hi all! I'm following the thread with a lot of interest. Problem is that this week I'm on holidays without access to the laptop (first time ever and it's being great :) I find some points here, nearly all them mentioned before: - The need for a Tenant / Tenancy entity. - The need for an interface or abstract base entity that allows to know the Tenant associated with an entity. - the need for the concept of ownership, that in our case could be associated at least with a role (and perhaps with a specific user? If that's the case perhaps a common abstract parent entity for User and Role should be needed). - and probably the need for Role compositions (parent-child relationships or preferably m-n relationships - extended RBAC- for nested roles). - A property like ownerByDefault or similar that should reference the owning Role (or User?) assigned by default to any entity created by this user (it could be changed or not afterwards depending on business logic). Adding something like that to current great implementation should allow for easy (and really fine-grained) domain security. I don't have access to my list of other implementations so it could change a bit, but basically that was the basis. HTH, Oscar El 20/11/2014, a las 6:22, Jeroen van der Wal jer...@stromboli.it escribió: Hi Martin B, We added Tenancy to the security module which, in our case, represents a different legal entity and a users are assigned to a tenancy. We've looked at RBAC [1] but were very pragmatic while implementing the module ;-) There's certainly room for improvement so if you can share your thoughts, requirements or entity model here we can perhaps align efforts. Oscar Bou, one of our other committers was very keen on this subject too. Oscar: perhaps you want to pitch in too? And yes, please you can always fork it! Cheers, Jeroen [1] http://en.wikipedia.org/wiki/Role-based_access_control On Thu, Nov 20, 2014 at 9:48 AM, Martin Balmaceda martin.balmac...@gmail.com wrote: Im not sure how using a Shiro role would work since they are predefined yet organizations can be added/removed dynamically On Thu, Nov 20, 2014 at 10:37 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, I am not familiar with isis security module but isn't it possible to use a (Shiro) Role as an Organization ? Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Nov 20, 2014 at 10:31 AM, johandoornen...@filternet.nl wrote: - Hi Martin, maybe you can try a solution that I made and that works for me at the moment; I defined a 'an abstrat secure object' that has the properties you are looking for [1] [1] https://github.com/johandoornenbal/matching/blob/master/dom/src/main/java/info/matchingservice/dom/MatchingSecureMutableObject.java Thanks I agree, option 1 is much better. As for my user case: I have a system that hosts a number or organizations orthogonally. What I need to do is associate each user to exactly 1 org so that he/she can only see and modify information belonging to that org. After looking at the problem, I figure that the best way to do it would be to use the security module and add an Organization property to ApplicationUser. Unfortunately it seems I would have to fork the module and add my custom Orgnization domain object to it. On Wed, Nov 19, 2014 at 5:54 PM, Dan Haywood wrote: On 19 November 2014 16:41, Jeroen van der Wal wrote: Just double-checked: the master branch of isis-module-security uses the latest and greatest version of Isis, 1.8.0-SNAPSHOT [1] https://github.com/isisaddons/isis-module-security/blob/master/pom.xml#L32-L36 (though the
Re: Questions
Hi, Alex. 2. The aggregates seem not to work (from what I read, it is supported only for NoSQL). I read also on the site that it istn't fully supported and its use is currently discouraged. What does it mean? Is rather recommended to use the Value Types or there is another alternative? Again, this arises from using JDO. Aggregates were necessary as a hint for our old home-grown objectstores, eg NoSQL and XML, to tell it to persist referenced objects in-line. Now we use JDO as our ORM, it means there's nothing else in the framework that requires this semantic. The closest alternative is to use JDO embedded objects [1]. Haven't used this myself, but I think Oscar has, and think it should work. We're not using embedded objects, but instead 1-1 relationships, that works really good. If they're persisted or not in a different table is not a matter of DDD (it's a persistence matter). But the main characteristic of them is that they should be inmutable, which you can easily achieve by using [1]. That same Value Object (for example, an Address) could be referenced by multiple Entities (being mapped in fact as a 1-n relationship). http://isis.apache.org/more-advanced-topics/how-to-02-080-How-to-specify-that-none-of-an-object's-members-can-be-modified-or-invoked.html So my recommendation for now is that you stick with use JDO, but configure it (in the JDBC URLs in persistor.properties) to use an in-memory database (eg HSQLDB as in the archetypes, or H2). I fully agree with Dan. I've never tried it, but the theoretical advantage of JDO over JPA is that it's better for NoSQL databases. HTH, Oscar El 9/12/2014, a las 16:56, Dan Haywood d...@haywood-associates.co.uk escribió: On 9 December 2014 at 15:32, Alexandru Vladut alexandruvla...@gmail.com wrote: Hi, I am currently working on a personal project where I try to apply the principles of DDD. I am reading Dan's book Domain Driven Design using Naked Objects, trying to adapt the examples to the Isis Framework. During my work I found some problems that I need to be clarified: Welcome to the mailing list, Alex. 1. The Value-Object pattern seems not to work as in the documentation. It says that you need only to annotate your class with @Value and to implement the interface ValueSemanticsProvider. But it worked only if I annotated the field with @javax.jdo.annotations.Persistent and the getter with @org.apache.isis.applib.annotation.NotPersisted. I didn't find any example, neither in the SimpleObject nor in ToDoApp. Did I do anything wrong or can I find an example anywhere? No, you've not done anything wrong... right now we aren't supporting the @Value semantics. The primary reason for this is because of our use of JDO/DataNucleus; there is no equivalent general purpose mechanism (other than to persist values as serializable byte[] arrays, not exactly satisfactory). This is something that I'd like to look at again; not having @Value means violating DRY, eg using strings and then having to specify the same semantics the would-be value type is used as a property or a parameter. But right now pragmatism wins out! 2. The aggregates seem not to work (from what I read, it is supported only for NoSQL). I read also on the site that it istn't fully supported and its use is currently discouraged. What does it mean? Is rather recommended to use the Value Types or there is another alternative? Again, this arises from using JDO. Aggregates were necessary as a hint for our old home-grown objectstores, eg NoSQL and XML, to tell it to persist referenced objects in-line. Now we use JDO as our ORM, it means there's nothing else in the framework that requires this semantic. The closest alternative is to use JDO embedded objects [1]. Haven't used this myself, but I think Oscar has, and think it should work. 3. I would like to know, also, if it is possible to completely eliminate the JDO for storage. Firstly I want to use a fully in-memory storage, without any database (does the DomainObjectContainer support anything like that?) and afterwards something else. Right now the objectstore API is pluggable, so you can change to an in-memory implementation by changing the isis.persistor key in isis.properties file to in-memory. HOWEVER, doing that will break (or at least disable) some aspects of the framework, most notably dirty object tracking (eg as used for auditing capability) and also maintenance of bidirectional relationships. Accordingly, we are almost certain to remove this pluggable API in the future (in Isis 2.0 next year), so that we can continue to slim down the Isis framework's responsibilities and focus on domain metamodels and their representation. We might re-introduce a pluggable API in the future, but only as a means to supporting other full-fledged persistence solutions (eg EclipseLink or Hibernate) that support lazy loading/dirty
Re: Programmatically hide, disable or validate for services and objects
Thanks, Dan and Jeroen. The proposed solution is enough for my requirements. But I've also just noticed these links for hiding [1] and disabling [2] all members ... I've also verified that [1] works not only for Domain Entities, but also for Services (not showing their actions as UI menus), so it fulfills my requirements with a simpler solution. Regards, Oscar [1] http://isis.apache.org/more-advanced-topics/how-to-02-040-How-to-specify-that-none-of-an-object's-members-is-visible.html [2] http://isis.apache.org/more-advanced-topics/how-to-02-080-How-to-specify-that-none-of-an-object's-members-can-be-modified-or-invoked.html El 8/12/2014, a las 8:41, Dan Haywood d...@haywood-associates.co.uk escribió: On 7 December 2014 at 11:19, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Hi to all. Is there a way to hide an object service programmatically (i.e., using a hide() method) ? The only way I know is the @Hidden annotation. There isn't currently any built-in method for this, no. You can find this out by looking for facets that implement HidingInteractionAdvisor. But on way the requirement can be supported is using the event bus, eg adding this to the SimpleObjects service will hide the service (because all of its actions are hidden): @Programmatic @PostConstruct public void postConstruct() { eventBusService.register(this); } @Programmatic @Subscribe public void on(final ActionInteractionEvent? ev) { switch(ev.getPhase()) { case HIDE: if(SimpleObjects.class.isAssignableFrom(ev.getSource().getClass())) { ev.hide(); } break; } } @javax.inject.Inject private EventBusService eventBusService; Given we have such flexible support, I'm not certain we need any additional special supporting methods. What do you think? HTH Dan Same way, both them could be disabled (on Services it would mean all actions would be disabled). And also, for objects they could be programmatically validated. It could be also useful for per-instance security. Is it currently available? If not, could it be a good idea to create a facet for hide(), disable(), validate() methods ? Thanks, Oscar Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: [ANNOUNCE] New committer - Martin Grigorov
Hi, Martin! Welcome here and really nice contributions! The viewer was a really important component. I've just convinced a mate to use the latest SNAPSHOT for a new project and that has given to me the opportunity yo try it. It's really cool, so a great work all you. Also, I've seen a lot of understanding of other parts of the framework, so it's really nice to count with you. Regards, Oscar El 5/12/2014, a las 9:53, Kevin Meyer ke...@kmz.co.za escribió: Congratulations, Martin, and welcome! As Jeroen says, I look forward to meeting you at the next IsisCon! Kind regards, Kevin On Thu, December 4, 2014 16:28, Dan Haywood wrote: I'm delighted to announce that Martin Grigorov has been voted in as a committer on Isis, and also as a member of the Isis PMC. The first gives Martin the right to commit changes directly to Isis' codebase, the second gives him the right to be involved in future votes. Martin is already a key committer on the Apache Wicket [1,2] project, as well as actively contributing to the companion Wicket-bootstrap [3,4] project. But you also can't failed to have noticed his involvement in Isis' users and dev lists recently. Initially Martin got involved because Jeroen and I asked him to help bootstrappify the Wicket viewer [5]. Even though that piece of work is substantially complete, Martin continues to be actively involved, providing patches and working on other tickets, and from speaking with him I know he's keen to get involved with all aspects of Isis, not just the Wicket viewer. For recent contributions, check out these github statistics [6] and his activity stream on JIRA [7]. I'm looking forward to working with Martin in the future; another great addition to Isis' committers. So please join me in welcoming him to our happy band! Dan Haywood Apache Isis PMC Chair [1] http://wicket.apache.org/ [2] https://github.com/apache/wicket/graphs/contributors [3] https://github.com/l0rdn1kk0n/wicket-bootstrap [4] https://github.com/l0rdn1kk0n/wicket-bootstrap/graphs/contributors [5] https://issues.apache.org/jira/browse/ISIS-537 [6] https://github.com/apache/isis/graphs/contributors [7] https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mgrigorov -- Kevin Meyer Ljubljana, Slovenia Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Isis Documentation Online Demo points to a SimpleApp instance
Hi Dan. Current link to demo app. on [1] points to a SimpleApp running instance, instead of the ToDoApp it might be. Regards, Oscar [1] http://isis.apache.org/documentation.html
Re: Archetypes for 1.8.0-SNAPSHOT
Hi, Dan. I got this: [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] [INFO] Building Maven Stub Project (No POM) 1 [INFO] [INFO] [INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom [INFO] [INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Batch mode [INFO] Archetype repository missing. Using the one from [org.apache.isis.archetype:todoapp-archetype:1.7.0] found in catalog remote [INFO] Downloading: http://repository-estatio.forge.cloudbees.com/snapshot/org/apache/isis/archetype/todoapp-archetype/1.8.0-SNAPSHOT/maven-metadata.xml [INFO] Downloading: http://repository-estatio.forge.cloudbees.com/snapshot/org/apache/isis/archetype/todoapp-archetype/1.8.0-SNAPSHOT/todoapp-archetype-1.8.0-SNAPSHOT.jar [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 12.035 s [INFO] Finished at: 2014-11-14T16:50:11+01:00 [INFO] Final Memory: 11M/183M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.isis.archetype:todoapp-archetype:1.8.0-SNAPSHOT) - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException HTH, Oscar El 14/11/2014, a las 16:34, Dan Haywood d...@haywood-associates.co.uk escribió: Hi folks, One thing we've been meaning to do for a while is to make our Maven archetypes available against SNAPSHOT, so y'all can try out latest versions without needing to build Isis yourself. Given that 1.8.0-SNAPSHOT is a significant release, we thought now would be a good time to put this in place. So, I'd be grateful for anyone to try this and let us know if it works for you. The instructions are on the archetype pages on our website, for either the simpleapp archetype [1] or the todoapp archetype [2]. Spin down to the section Generating the App (snapshot release) and continue from there. Any feedback, good or bad, most welcome. Thx Dan [1] http://isis.apache.org/intro/getting-started/simpleapp-archetype.html [2] http://isis.apache.org/intro/getting-started/todoapp-archetype.html Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com http://www.gesconsultor.com/ Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: EventBusServiceDefault: ConcurrentModificationException
Thanks, Dan. I’ve read the discussion between the 2 alternatives. Also that there are some plans to “extend” support for CDI-style. Really interesting. Regards, Oscar El 13/11/2014, a las 1:51, Dan Haywood d...@haywood-associates.co.uk escribió: I've raised ISIS-948 for this. On 21 October 2014 10:38, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com wrote: Thanks for your response, Dan. Have you seen the usage pattern at [1] using @PostConstruct and @PreDestroy? Probably it could be used for both request-scoped and singleton services, don't you think? Thanks, Oscar [1] http://es.slideshare.net/koneru/guavas-event-bus http://es.slideshare.net/koneru/guavas-event-bus El 21/10/2014, a las 11:33, Dan Haywood d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk escribió: Hi Oscar, I need to think this through a bit... I have a strong suspicion that what we have is too complex. My thinking is that I've implemented the registration/deregistratrion for each request/transaction. However, given that services are basically singletons, I'm wondering if there is any reason not to just register them once at system startup and then leave it at that. The thing that's uncertain to me is how any request-scoped services would behave... these are implemented as Javassist wrappers around the underlying service pojo, setup and torn down for each request. None of the Isis-provided request-scoped services (eg QueryResultsCache, Scratchpad) subscribe to the event bus, so there would be no issue with those. And my guess is that there's probably no-one in the user community who has written their own. So perhaps a first-cut simplification would be to register all singleton services with the event bus, but to ignore any request-scoped services. Thoughts? In the meantime, the good news is that you can register your own implementation of EventBusService (via isis.properties) and it will be used instead of the default impl. Dan On 21 October 2014 10:10, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com wrote: There's a thread discussing the multiple registration and unregister exception thrown subjects here [1]. Perhaps a similar implementation on the EventBusService will also do the trick. Any opinions? Thanks, Oscar [1] https://code.google.com/p/guava-libraries/issues/detail?id=784 https://code.google.com/p/guava-libraries/issues/detail?id=784 El 21/10/2014, a las 00:52, GESCONSULTOR - Óscar Bou o@gesconsultor.com mailto:o@gesconsultor.com escribió: Just to clarify in order to being able to determine the root cause. We are currently registering the EventBusService as this: public class AssetsRiskInformation extends AbstractSingletonMultiTenantObjectRepositoryAndFactoryAssetRiskInformation { ... // {{ injected: EventBusService private EventBusService eventBusService; public final void injectEventBusService(final EventBusService eventBusService) { if (this.eventBusService == null) { this.eventBusService = eventBusService; eventBusService.register(this); } } // }} } As seemed that the injectEventBusService(xxx) method was called more than once, the register(this) must verify it's the first time. Also, as seemed that the Service was unregistered by Isis when ending a transaction, as per: Caused by: java.lang.IllegalArgumentException: missing event subscriber for an annotated method. Is com.xms.framework.risk.domain.model.continuity.AssetsBCMInformation@552cc955 registered? at com.google.common.eventbus.EventBus.unregister(EventBus.java:230) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.close(EventBusServiceDefault.java:63) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeOtherApplibServicesIfConfigured(IsisTransaction.java:776) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeServices(IsisTransaction.java:758) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommitServices(IsisTransaction.java:748) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommit(IsisTransaction.java:727) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endTransaction(IsisTransactionManager.java:470) at com.xms.framework.devstudio.service.AbstractDevStudioDomainService.executeAction(AbstractDevStudioDomainService.java:184) We are not sure if the service that the service is re-registered when starting a new transaction: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894) at java.util.HashMap$KeyIterator.next(HashMap.java:928
Re: Heads up! Significant UI changes in 1.8.0
Really well done, team. In our case that originated (two years ago) to opt for adapting our custom-made viewer. This will be of interest for a great part of the community for sure ... El 22/10/2014, a las 09:11, Dan Haywood d...@haywood-associates.co.uk escribió: Just so you are all aware... ... in 1.8.0 we will be refactoring the Wicket viewer to leverage Martin Grigorov's integration [1] with Bootstrap [2]. (Martin is one of the core Apache Wicket committers). What that means is that we'll be able to support themeable pages, optionally switchable by the end-user. We'll probably bundle some prebuilt themes from bootswatch [3], And you'll also be able to develop your own themes, eg using bootswatchr [4]. We'll also try to provide a custom theme that is as close as possible to the current look-n-feel, but it will inevitably differ in some regards. This is still work-in-progress, but to get a flavour, see [5] All feedback welcome Cheers Dan [1] https://github.com/l0rdn1kk0n/wicket-bootstrap [2] http://getbootstrap.com/ [3] http://bootswatch.com/ [4] http://bootswatchr.com/ [5] http://imgur.com/a/RcO5u Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: EventBusServiceDefault: ConcurrentModificationException
There's a thread discussing the multiple registration and unregister exception thrown subjects here [1]. Perhaps a similar implementation on the EventBusService will also do the trick. Any opinions? Thanks, Oscar [1] https://code.google.com/p/guava-libraries/issues/detail?id=784 El 21/10/2014, a las 00:52, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Just to clarify in order to being able to determine the root cause. We are currently registering the EventBusService as this: public class AssetsRiskInformation extends AbstractSingletonMultiTenantObjectRepositoryAndFactoryAssetRiskInformation { ... // {{ injected: EventBusService private EventBusService eventBusService; public final void injectEventBusService(final EventBusService eventBusService) { if (this.eventBusService == null) { this.eventBusService = eventBusService; eventBusService.register(this); } } // }} } As seemed that the injectEventBusService(xxx) method was called more than once, the register(this) must verify it's the first time. Also, as seemed that the Service was unregistered by Isis when ending a transaction, as per: Caused by: java.lang.IllegalArgumentException: missing event subscriber for an annotated method. Is com.xms.framework.risk.domain.model.continuity.AssetsBCMInformation@552cc955 registered? at com.google.common.eventbus.EventBus.unregister(EventBus.java:230) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.close(EventBusServiceDefault.java:63) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeOtherApplibServicesIfConfigured(IsisTransaction.java:776) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeServices(IsisTransaction.java:758) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommitServices(IsisTransaction.java:748) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommit(IsisTransaction.java:727) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endTransaction(IsisTransactionManager.java:470) at com.xms.framework.devstudio.service.AbstractDevStudioDomainService.executeAction(AbstractDevStudioDomainService.java:184) We are not sure if the service that the service is re-registered when starting a new transaction: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894) at java.util.HashMap$KeyIterator.next(HashMap.java:928) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.open(EventBusServiceDefault.java:55) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.initOtherApplibServicesIfConfigured(IsisTransactionManager.java:291) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:269) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:155) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:695) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:682) Despite that, I think that this concurrency exception should be avoided: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894) at java.util.HashMap$KeyIterator.next(HashMap.java:928) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.open(EventBusServiceDefault.java:55) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.initOtherApplibServicesIfConfigured(IsisTransactionManager.java:291) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:269) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:155) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:695) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:682) On last page (22) of the following slideshare presentation [1], seems that once injected, the safest way to register and unregister it is by means of the @PostConstruct and @PreDestroy annotations, but not sure if that would eliminate the exceptions thrown
Re: EventBusServiceDefault: ConcurrentModificationException
Thanks for your response, Dan. Have you seen the usage pattern at [1] using @PostConstruct and @PreDestroy? Probably it could be used for both request-scoped and singleton services, don't you think? Thanks, Oscar [1] http://es.slideshare.net/koneru/guavas-event-bus El 21/10/2014, a las 11:33, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, I need to think this through a bit... I have a strong suspicion that what we have is too complex. My thinking is that I've implemented the registration/deregistratrion for each request/transaction. However, given that services are basically singletons, I'm wondering if there is any reason not to just register them once at system startup and then leave it at that. The thing that's uncertain to me is how any request-scoped services would behave... these are implemented as Javassist wrappers around the underlying service pojo, setup and torn down for each request. None of the Isis-provided request-scoped services (eg QueryResultsCache, Scratchpad) subscribe to the event bus, so there would be no issue with those. And my guess is that there's probably no-one in the user community who has written their own. So perhaps a first-cut simplification would be to register all singleton services with the event bus, but to ignore any request-scoped services. Thoughts? In the meantime, the good news is that you can register your own implementation of EventBusService (via isis.properties) and it will be used instead of the default impl. Dan On 21 October 2014 10:10, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: There's a thread discussing the multiple registration and unregister exception thrown subjects here [1]. Perhaps a similar implementation on the EventBusService will also do the trick. Any opinions? Thanks, Oscar [1] https://code.google.com/p/guava-libraries/issues/detail?id=784 El 21/10/2014, a las 00:52, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Just to clarify in order to being able to determine the root cause. We are currently registering the EventBusService as this: public class AssetsRiskInformation extends AbstractSingletonMultiTenantObjectRepositoryAndFactoryAssetRiskInformation { ... // {{ injected: EventBusService private EventBusService eventBusService; public final void injectEventBusService(final EventBusService eventBusService) { if (this.eventBusService == null) { this.eventBusService = eventBusService; eventBusService.register(this); } } // }} } As seemed that the injectEventBusService(xxx) method was called more than once, the register(this) must verify it's the first time. Also, as seemed that the Service was unregistered by Isis when ending a transaction, as per: Caused by: java.lang.IllegalArgumentException: missing event subscriber for an annotated method. Is com.xms.framework.risk.domain.model.continuity.AssetsBCMInformation@552cc955 registered? at com.google.common.eventbus.EventBus.unregister(EventBus.java:230) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.close(EventBusServiceDefault.java:63) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeOtherApplibServicesIfConfigured(IsisTransaction.java:776) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeServices(IsisTransaction.java:758) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommitServices(IsisTransaction.java:748) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommit(IsisTransaction.java:727) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endTransaction(IsisTransactionManager.java:470) at com.xms.framework.devstudio.service.AbstractDevStudioDomainService.executeAction(AbstractDevStudioDomainService.java:184) We are not sure if the service that the service is re-registered when starting a new transaction: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894) at java.util.HashMap$KeyIterator.next(HashMap.java:928) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.open(EventBusServiceDefault.java:55) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.initOtherApplibServicesIfConfigured(IsisTransactionManager.java:291) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:269) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:155) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant
java.lang.NullPointerException at org.apache.isis.core.runtime.system.transaction.IsisTransaction.enlistDeleting
Hi to all. I've just found an exception that it's appearing rather frequently, without knowing the exact root cause. It's the following one. Any ideas about the possible root cause or any work-around? Thanks in advance, Oscar Caused by: java.lang.NullPointerException at org.apache.isis.core.runtime.system.transaction.IsisTransaction.enlistDeleting(IsisTransaction.java:1172) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$5.run(FrameworkSynchronizer.java:244) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$7.call(FrameworkSynchronizer.java:291) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$7.call(FrameworkSynchronizer.java:287) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:276) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:287) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.preDeleteProcessingFor(FrameworkSynchronizer.java:238) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$4.doRun(IsisLifecycleListener.java:128) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$RunnableAbstract.run(IsisLifecycleListener.java:201) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.withLogging(IsisLifecycleListener.java:180) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.preDelete(IsisLifecycleListener.java:124) at org.datanucleus.api.jdo.JDOCallbackHandler.preDelete(JDOCallbackHandler.java:215) at org.datanucleus.state.JDOStateManager.deletePersistent(JDOStateManager.java:4661) at org.datanucleus.ExecutionContextImpl.deleteObjectInternal(ExecutionContextImpl.java:2544) at org.datanucleus.store.rdbms.scostore.FKSetStore.clear(FKSetStore.java:818) at org.datanucleus.store.types.backed.SortedSet.clear(SortedSet.java:814) at org.datanucleus.store.rdbms.mapping.java.CollectionMapping.preDelete(CollectionMapping.java:295) at org.datanucleus.store.rdbms.request.DeleteRequest.execute(DeleteRequest.java:192) at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.deleteTable(RDBMSPersistenceHandler.java:508) at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.deleteObject(RDBMSPersistenceHandler.java:479) at org.datanucleus.state.AbstractStateManager.internalDeletePersistent(AbstractStateManager.java:822) at org.datanucleus.state.JDOStateManager.deletePersistent(JDOStateManager.java:4685) at org.datanucleus.ExecutionContextImpl.deleteObjectInternal(ExecutionContextImpl.java:2544) at org.datanucleus.ExecutionContextImpl.deleteObjectWork(ExecutionContextImpl.java:2466) at org.datanucleus.ExecutionContextImpl.deleteObject(ExecutionContextImpl.java:2417) at org.datanucleus.api.jdo.JDOPersistenceManager.jdoDeletePersistent(JDOPersistenceManager.java:802) at org.datanucleus.api.jdo.JDOPersistenceManager.deletePersistent(JDOPersistenceManager.java:820) at org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusDeleteObjectCommand.execute(DataNucleusDeleteObjectCommand.java:43) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:368) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:362) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:502) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:451) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:381) at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:234) at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:224) at com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory.doRemove(AbstractIsisDomainRepositoryAndFactory.java:352) at com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory.access$200(AbstractIsisDomainRepositoryAndFactory.java:45) at com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory$3.execute(AbstractIsisDomainRepositoryAndFactory.java:345) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:159) at
Re: EventBusServiceDefault: ConcurrentModificationException
Just to clarify in order to being able to determine the root cause. We are currently registering the EventBusService as this: public class AssetsRiskInformation extends AbstractSingletonMultiTenantObjectRepositoryAndFactoryAssetRiskInformation { ... // {{ injected: EventBusService private EventBusService eventBusService; public final void injectEventBusService(final EventBusService eventBusService) { if (this.eventBusService == null) { this.eventBusService = eventBusService; eventBusService.register(this); } } // }} } As seemed that the injectEventBusService(xxx) method was called more than once, the register(this) must verify it's the first time. Also, as seemed that the Service was unregistered by Isis when ending a transaction, as per: Caused by: java.lang.IllegalArgumentException: missing event subscriber for an annotated method. Is com.xms.framework.risk.domain.model.continuity.AssetsBCMInformation@552cc955 registered? at com.google.common.eventbus.EventBus.unregister(EventBus.java:230) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.close(EventBusServiceDefault.java:63) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeOtherApplibServicesIfConfigured(IsisTransaction.java:776) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.closeServices(IsisTransaction.java:758) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommitServices(IsisTransaction.java:748) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.preCommit(IsisTransaction.java:727) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endTransaction(IsisTransactionManager.java:470) at com.xms.framework.devstudio.service.AbstractDevStudioDomainService.executeAction(AbstractDevStudioDomainService.java:184) We are not sure if the service that the service is re-registered when starting a new transaction: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894) at java.util.HashMap$KeyIterator.next(HashMap.java:928) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.open(EventBusServiceDefault.java:55) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.initOtherApplibServicesIfConfigured(IsisTransactionManager.java:291) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:269) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:155) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:695) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:682) Despite that, I think that this concurrency exception should be avoided: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894) at java.util.HashMap$KeyIterator.next(HashMap.java:928) at org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault.open(EventBusServiceDefault.java:55) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.initOtherApplibServicesIfConfigured(IsisTransactionManager.java:291) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:269) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:155) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:695) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.doFindByPropMultiTenant(AbstractXMSDomainObjectRepositoryAndFactory.java:682) On last page (22) of the following slideshare presentation [1], seems that once injected, the safest way to register and unregister it is by means of the @PostConstruct and @PreDestroy annotations, but not sure if that would eliminate the exceptions thrown. HTH, Oscar [1] http://es.slideshare.net/koneru/guavas-event-bus El 20/10/2014, a las 22:31, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Hi to all. Our app is using the EventBusServiceDefault implementation and the following exception is thrown occasionally: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894
Re: 1:1 relationship between objects supported in ISIS?
Hi all. I have the following template on Eclipse for 1-1 child properties (for the parent property no special annotation is needed. Simply a @Column one): // {{ ${PropertyName} (property) private ${PropertyType} ${propertyName}; ${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column,javax.jdo.annotations.Persistent)}@MemberOrder(sequence=1) @Column(allowsNull=${trueOrFalse}) @Persistent(mappedBy=${fieldOnChild}) public ${PropertyType} get${PropertyName}() { return ${propertyName}; } public void set${PropertyName}(final ${PropertyType} ${propertyName}) { this.${propertyName} = ${propertyName}; } // }} It's on the Apache Isis Eclipse Editor templates file [1], named isjdp-11c - JDO Property (1:1 child) HTH, Oscar [1] http://isis.apache.org/intro/resources/editor-templates.html El 16/09/2014, a las 11:52, Dan Haywood d...@haywood-associates.co.uk escribió: That's true, I'd forgotten about that one. On 16 September 2014 10:14, Jeroen van der Wal jer...@stromboli.it wrote: The next and previous pattern we use in Estatio [1] is an example of a 1:1 relationship. [1] https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/dom/lease/LeaseTerm.java#L341-L372 On Tue, Sep 16, 2014 at 10:21 AM, Dan Haywood d...@haywood-associates.co.uk wrote: We don't have a 1:1 example in Estatio, but I'm pretty sure I've seen an example someone else posted that did have one. Oscar, do you use 1:1 in your app? At any rate, the DataNucleus pages should help [1] Cheers Dan [1] http://www.datanucleus.org/products/datanucleus/jdo/orm/one_to_one.html On 16 September 2014 08:56, johandoornen...@filternet.nl wrote: How can I define a one-on-one relationship between objects in ISIS (using JDO)? I tried to define a key in both objects but didn't succeed... Is there an example somewhere?
Re: Has Java Traits and Mixins by means of Apache Isis ?
Hi, Ged. Jeroen can give you more detail, but as far as I know: - CommunicationChannels is the service that holds the properties, collections and actions to be contributed (i.e., it's the trait) [1]. - CommunicationChannelOwner is the interface to mark those Entities that must be contributed with [2]. - CommunicationChannel is an ABSTRACT Entity that can be contributed (as a property, as a collection) [3]. - The whole package that contains concrete implementations of CommunicationChanel to be contributed [4]. See at [1] how easy and clear is the code to define a contribution / trait, thanks to Dan and Jeroen's efforts :)) REALLY powerful for decoupling, reuse among entities and ease code maintenance... HTH, Oscar [1] https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/dom/communicationchannel/CommunicationChannels.java [2] https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/dom/communicationchannel/CommunicationChannelOwner.java [3] https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/dom/communicationchannel/CommunicationChannel.java [4] https://github.com/estatio/estatio/tree/master/dom/src/main/java/org/estatio/dom/communicationchannel El 07/09/2014, a las 11:58, Ged Byrne ged.by...@gmail.com escribió: Hi Dan, Are you familiar with DCI? Object-oriented programming was supposed to unify the perspectives of the programmer and the end user in computer code: a boon both to usability and program comprehension. While objects capture structure well, they fail to capture system action. DCI is a vision to capture the end user cognitive model of roles and interactions between them. http://www.artima.com/articles/dci_vision.html It's always struck me that there is a similarity between DCI and Naked Objects. Lack of traits is one of the big differences sice DCI relies so heavily on them. So I'm intrigued to learn about contributions. Regards, Ged — Sent from Mailbox On Sun, Sep 7, 2014 at 10:00 AM, Dan Haywood d...@haywood-associates.co.uk wrote: Hi Oscar, Yes, the are many similarities between traits and contributions. In fact I've often thought that Isis is in some regards more of an aspect-oriented framework than an object - oriented frameworks. At the system level it implements presentation logic as a cross - cutting concern, sell as the more usual security, transactions and auditing. Using the event bus one can also book into these pointcuts at an application level. Cheers, Dan. On 6 Sep 2014 18:01, QUALITEC - Óscar Bou o...@qualitec.es wrote: Hi to all. Just to notice that I've been reading recently about the concept of traits [1] and mixins [2], as a way to encourage code reuse avoiding inheritance problems. This language features are supported by languages like Ada, Groovy, Scala or Python, but there's no native support for Java. It's REALLY noticeable that we, as Apache Isis users, have somewhat an implementation of those concepts by means of contributions [3]. So, can we think about contributions as a traits or mixins implementation for Apache Isis developed systems? Regards, Oscar [1] http://en.wikipedia.org/wiki/Trait_(computer_programming) [2] http://en.wikipedia.org/wiki/Mixin [3] http://isis.apache.org/more-advanced-topics/how-to-01-062-How-to-decouple-dependencies-using-contributions.html Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: Integ Testing - mocking Services action invocations
Hi, Dan. Many thanks for your answer. The problem I was finding when trying to mock the service was that it was a whole new instance, and there's no way to replace the default instance by this mocked one, or to load the mocked one at first, instead of Isis creating a new instance by means of the IsisSystemForTest.Builder. This was not a priority test (it was an easy to implement functionality and I can simply go to the UI to know if it works) but perhaps there will be more cases where mocked services could be need in the future. If you can send me that TDD slides would be grate! Until now, nearly all our tests are integration tests, but there are some external systems we are connecting through Isis services where unit testing would be wonderful, as they could be tested without being connected to the external system. Thanks! El 19/06/2014, a las 10:25, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, That sample looks *almost* correct. JMockActions.returnEach is a custom implementation of the JMock Action API that I wrote for some purpose or other (a method that returns a different value each time it is called); but normally one would use the built-in action implementations, usually either returnValue(...) or throwException(...). Thus: // given context.checking(new Expectations() { { one([DOMAIN SERVICE]).locale(); will(returnValue(new Locale(en))); } }); Are you certain that [DOMAIN SERVICE] is a mock, though? the IntegrationTestAbstract will usually return real service implementations? (I was about to go on to say say that you could override IntegrationTestAbstract#getService(...) to return a mock for the service you want, but on second thoughts I don't think that would work, because the actual system under test would be using a real implementation of the service) If you are still struggling with JMock, I have a TDD training course that covers it, happy to send you it off-list. Cheers Dan On 18 June 2014 18:43, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Hi to all. I have an Integration Test where I want to mock the resulting value of a service's method. I have no experience with JMock and seems quite different from mockito. I see the context property defined on IntegrationTestAbstract, but not sure about how to best specify that whenever I invoke that service method, the result value should be x. I've looked at the samples at [1], but not sure about how to specify something like: // given // final UserAccount userAccount = this.service(UserAccount.class); this.context.checking(new Expectations() { { this.one([DOMAIN SERVICE]).locale(); this.will(JMockActions.returnEach(new Locale(en))); } }); Any help, please? Thanks, Oscar Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: modifiable properties of derived property
1. Once updated Isis to the latest snapshot, 2. try to inject the WrapperFactory service, 3. and then replace public void modifyForcedonPBX(Boolean forcedonPBX) { getMobileSubscriber().setForcedonPBX(forcedonPBX); } with public void modifyForcedonPBX(Boolean forcedonPBX) { wrapperFactory.wrapSkipRules(getMobileSubscriber()).setForcedonPBX(forcedonPBX); } HTH, Oscar El 16/06/2014, a las 12:11, Erik de Hair e...@pocos.nl escribió: I'm not wrapping any object. This is what I have in my code: public Boolean isForcedonPBX() { return getMobileSubscriber().isForcedonPBX(); } public void modifyForcedonPBX(Boolean forcedonPBX) { getMobileSubscriber().setForcedonPBX(forcedonPBX); } The getMobileSubscriber() returns the derived object. I have no wrapping-methods available right now. Will do an update first. Thanks, Erik From: GESCONSULTOR [o@gesconsultor.com] Sent: Monday, June 16, 2014 12:01 PM To: users@isis.apache.org Subject: Re: modifiable properties of derived property Hi Erik. Are you invoking the setter within a a wrapped call? If so, on the modifyXXX instead of this.wrap(domainObjectB).setXXX Try this.wrapSkipRules(domainObjectB).setXXX This will execute all business logic associated with the property (validate, modify, etc) without taking into account if the field is hidden or disabled. wrapSkipRules was introduced about a month ago or so, so perhaps you will need to update Isis to the latest snapshot El 16/06/2014, a las 11:42, Erik de Hair e...@pocos.nl escribió: Hi, I have a class A that has a derived property referencing class B that has some properties. B's fields are all disabled when editing class A. Is it possible to modify B's properties by delegating the setters of these properties to A by using modifyXXX-methods? I tried to do this but the fields are still disabled (with reason always disabled). Thanks, Erik Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: wizard like form
But if the annotations are part of the Isis model, shouldn't be a default implementation included on the free Viewer? Independently, the implementation could be replaceable / pluggeable with a custom one, just as any other components. But at least one should be included by default. I also think that it adds quite points to the quickstart demo, as it's an alternative design to usual Isis UI. But that's completely subjective, of course :-)) HTH, Oscar El 13/06/2014, a las 13:27, Dan Haywood d...@haywood-associates.co.uk escribió: Further improvements committed, tickets ISIS-781 and ISIS-800 marked as resolved Discussing off-line with Jeroen, do have some further refactorings planned, however. Specifically: ... currently support for IWizard is hard-coded into the Wicket viewer; it ought to be a pluggable component (such as the map and calendar components). So will probably move it out and into a separate github repo. One consequence of that is that the quickstart todo app can't demonstrate the usage. So I'll need to move that into a github repo as a separate demo. One upside is that this ought to then plug into 1.5.0, rather than relying on a new release of Isis. Also, it'll be a good resource for how to write custom components to the Wicket viewer. But the basic functionality will be as currently implemented. More to follow Dan On 12 June 2014 20:34, Dan Haywood d...@haywood-associates.co.uk wrote: OK, I've done a first-pass implementation of both: * ISIS-781: editable view models, and * ISIS-800: wizards for the first, the view model must implement ViewModel.Cloneable. The way it works is that the view model is immutable so far as the rest of the framework is concerned, but (by implementing the Cloneable interface) when the view model is next re-rendered it is actually the clone. for the second, the view model must implement Wizard. This is actually a sub-interface of ViewModel.Cloneable that defines next, previous and finish methods. The todo/quickstart app has been updated to use this feature; see ToDoItemWizard. See also the cool use of contributed actions through the Categorized interface that contributes both to ToDoItemWizard and also the ToDoItem entity. ~~~ The design as it stands does mean there's a little bit of boilerplate to implement these various methods, but what we now have is probably good enough to ship in the next release. Any feedback welcome Dan On 10 June 2014 13:16, Dan Haywood d...@haywood-associates.co.uk wrote: On 10 June 2014 13:09, Erik de Hair e...@pocos.nl wrote: The action (on a domain object) has the following code: CreateSubscriptionViewModel viewModel = new CreateSubscriptionViewModel(); // or getContainer.newViewModelInstance viewModel.viewModelInit(newSubscription.title()); viewModel.setSubscription(newSubscripiton); // newSubscription is a newTransientObject created earlier return viewModel; I put the newSubscription in the viewmodel because I need this subscription in a later step to add some more data to it. But getting the subscription (or a property) for the ViewModel rendering gives a null pointer exception. A stack trace would be useful. But just to check: you have configured the MementoServiceDefault and the BookmarkServiceDefault ? I looked at the ToDoItem examples and Dileepa's code. I can see no conceptual difference except that ToDoItem uses persisted entities and Dileepa only sets the memento and does not pass more 'complex' objects in the ViewModel. Do the objects have to be serializable or do I miss something else? This is probably the issue. Making the object serializable might solve things, but it's rather unpalatable. Rather than creating a transient object, instead have the wizard store the state (ie the builder pattern), and only create (and persist) the object when done. ~~~ Isis does, in fact, have the ability to create serializable mementos even from non-serializable transient objects (a left over from the days when Isis' architecture was client/server); but this isn't currently exposed in a user-friendly applib service. We could look to doing so if the above approach is unpalatable, eg as an extension of MementoService. Dan Any idea? On 06/10/2014 12:07 PM, Dan Haywood wrote: On 10 June 2014 10:52, Erik de Hair e...@pocos.nlmailto:e...@pocos.nl wrote: Hi Dan, That's not the answer I hoped for ;-) sorry bout that! It looks like the ViewModels only work with persisted entities. Is that correct? Not exactly. A view model can hold references to any data; that's what the MementoService is for. Our Google Summer of Coder (Dileepa) has written a view model that wraps some JSON representing a gmail obtained via a web service, for example. Fundamentally a view model just has the ability to
Re: integration testing: 'lost' data
El 17/05/2014, a las 14:41, Dan Haywood d...@haywood-associates.co.uk escribió: On 15 May 2014 00:57, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Dan, please, correct me as needed :-)) The commands are added to a queue, and that queue is emptied on each transaction. correct The point is that Isis, for example, generates a new transaction on each action invokation. correct In the context of tests, that could be simulated by wrapping the calls (it would also force other business rules) to actions, and setters. sort-of. I've just been double checking as to the behaviour of transactions in tests; it is fairly sane, I think, though not well documented. We set up a new transaction for each test. The same transaction is present for the setup and the test method itself, in a state of IN_PROGRESS. You can confirm this using IsisContext.getTransactionManager().getTransaction().getState(). IsisSystemForTest.get() is a thread-local representation of the running system. Using this, it is possible to commit/abort and begin new transactions at any time: * IsisSystem.get().commitTran() * IsisSystem.get().abortTran() * IsisSystem.get().beginTran() The interaction of transactions with/without wrap() is as follows: 1. if a transaction is in progress (the default), then invoking without wrapping (as expected) takes place in the context of that interaction; the transaction is not committed 1. if a transaction is in progress, then wrapping - at least as far as transactions are concerned - has no effect; the interaction is performed in the context of the current transaction 3. if a transaction has been explicitly committed (so that none is in progress), then invoking without wrapping will cause an exception to be thrown (no xactn in progress) 4. if a transaction has been explicitly committed, then wrapping will automatically begin and commit the transaction around the interaction. So, Oscar, your statement corresponds to option 4, and is correct if the xactn had already been committed explicitly (in the setup, say) I understand. That's the reason why sometimes this.nextTransaction(); is mandatory on BDD steps... It can be unnecessary if you do a getContainer.flush() on each persist if it's needed mainly for sending changes to the database and for DataNucleus to automatically manage bi-directional relationships. In our case, we have created a persist method on each repository that persists the domain object and also executes a flush. A reasonable pattern. I'm pretty sure that any repository query will always do a flush anyway (analogous to Hibernate auto-flush function). So if this is the case, why not the default persist() implementation always do a getContainer.flush() by default, in order to avoid confusions like this one? There can be an alternative persistWithoutFlush() method if required. Perhaps its performance would not be as good for bulk inserts, but in the context of our domain we prefer to force the flush on each persist than the performance gained by queueing the database commands to be sent in blocks. If bulk inserts are ever required, then a good pattern is to define a domain service to do this sort of work. Then, start out with a naive implementation that just does individual flushes, and switch in a more performant implementation (eg calling stored procedures or whatever) if and when required. So long as the integration tests pass... On the topic of performance (for queries), do note that in 1.4.0 we introduced QueryResultsCache. And, DN has various L2 caching options for truly immutable data. We have some derived properties in our domain that are quite intensive on its computation. We are planning to use the cache method you implemented for actions. Cheers Dan HTH, Oscar Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046
Re: integration testing: 'lost' data
Dan, please, correct me as needed :-)) The commands are added to a queue, and that queue is emptied on each transaction. The point is that Isis, for example, generates a new transaction on each action invokation. In the context of tests, that could be simulated by wrapping the calls (it would also force other business rules) to actions, and setters. In our case, we have created a persist method on each repository that persists the domain object and also executes a flush. Perhaps its performance would not be as good for bulk inserts, but in the context of our domain we prefer to force the flush on each persist than the performance gained by queueing the database commands to be sent in blocks. HTH, Oscar El 14/05/2014, a las 15:50, Erik de Hair e...@pocos.nl escribió: container.flush() did the trick in this case. I have some other cases with almost the same problem. It's not always clear how these transactions act in tests but I managed to run all my tests. Also had a case where it didn't work to persist some data in the setup-method but it worked when I did exactly the same thing at the start of my test-method. :-/ It even looks like it works in a random way: sometimes an error, sometimes everything ok. Erik On 05/14/2014 01:23 PM, Dan Haywood wrote: 2014-05-14 11:38 GMT+01:00 GESCONSULTOR - Óscar Bou o@gesconsultor.commailto:o@gesconsultor.com: Hi, Erik. Perhaps DN holds them still in memory and has not been flushed to the database. I don't think that DN does, but Isis certainly does holds them in memory until the flush or commit. Dan Normally, it can be done by calling flush on the DomainContainer, similar to: this.getContainer().flush(); HTH, Oscar El 14/05/2014, a las 12:27, Erik de Hair e...@pocos.nlmailto:e...@pocos.nl escribió: Hi, I'm writing a test with some inserts in the @Before and a query to find the inserted objects (ResellerPortalIntegTest is the original SimpleIntegTest-class): public class ContactsTest extends ResellerPortalIntegTest { private Role role; private final String uniqueEmail = j...@pokos.nlmailto:j...@pokos.nlmailto:j...@pokos.nl; private final String duplicateEmail = ma...@pokos.nlmailto:ma...@pokos.nlmailto:ma...@pokos.nl; private final String unkownEmail = xyz...@bladiblah.commailto:xyz...@bladiblah.commailto:xyz...@bladiblah.com; @Before public void setUp(){ this.role = container().newTransientInstance(Role.class); this.role.setLabel(ROLE_ADMIN); this.role.setDescription((Reseller) admin); container().persistIfNotAlready(this.role); service(Contacts.class).create(Piet, van de, Pet, Gender.MALE, p...@pokos.nlmailto:p...@pokos.nlmailto:p...@pokos.nl, pietmetpet, this.role); service(Contacts.class).create(Jan, van de, Jas, Gender.MALE, this.uniqueEmail, janvandejas, this.role); service(Contacts.class).create(Marie, van de, Markt, Gender.FEMALE, this.duplicateEmail, marievandemarkt, this.role); service(Contacts.class).create(Marie, van de, Markt, Gender.FEMALE, this.duplicateEmail, marievandemarkt1, this.role); } @Test public void testFindUseraccountsByEmail() throws Exception { int expected = 1; int actual = wrap(service(Contacts.class)).findUseraccountsByEmail(this.uniqueEmail).size(); Assert.assertEquals(expected, actual); } } The actual value is '0' while I'm sure the requested object is inserted by the @Before-method and the query is all right. Is this an Isis issue or do I have to look for a Datanucleus/other solution? Thanks, Erik Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F [cid:4C38BF6A-D280-4C7F-BFC2-4285B2033897] 902 900 231 / 620 267 520 [cid:6DF89309-F557-4C28-BDFC-AE5B9D964612] http://www.twitter.com/oscarbou [cid:DDC0BB1F-E0FC-4120-97F8-E2D5F0DA9BC5] http://es.linkedin.com/in/oscarbou [cid:F31E93E9-D0D0-4F96-9A7C-496F094117DC] http://www.GesConsultor.comhttp://www.gesconsultor.com/ [cid:04E888F1-A5E9-49D1-832D-465FE2C6C940] Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos
Re: integration testing: 'lost' data
Hi, Erik. Perhaps DN holds them still in memory and has not been flushed to the database. Normally, it can be done by calling flush on the DomainContainer, similar to: this.getContainer().flush(); HTH, Oscar El 14/05/2014, a las 12:27, Erik de Hair e...@pocos.nl escribió: Hi, I'm writing a test with some inserts in the @Before and a query to find the inserted objects (ResellerPortalIntegTest is the original SimpleIntegTest-class): public class ContactsTest extends ResellerPortalIntegTest { private Role role; private final String uniqueEmail = j...@pokos.nlmailto:j...@pokos.nl; private final String duplicateEmail = ma...@pokos.nlmailto:ma...@pokos.nl; private final String unkownEmail = xyz...@bladiblah.commailto:xyz...@bladiblah.com; @Before public void setUp(){ this.role = container().newTransientInstance(Role.class); this.role.setLabel(ROLE_ADMIN); this.role.setDescription((Reseller) admin); container().persistIfNotAlready(this.role); service(Contacts.class).create(Piet, van de, Pet, Gender.MALE, p...@pokos.nlmailto:p...@pokos.nl, pietmetpet, this.role); service(Contacts.class).create(Jan, van de, Jas, Gender.MALE, this.uniqueEmail, janvandejas, this.role); service(Contacts.class).create(Marie, van de, Markt, Gender.FEMALE, this.duplicateEmail, marievandemarkt, this.role); service(Contacts.class).create(Marie, van de, Markt, Gender.FEMALE, this.duplicateEmail, marievandemarkt1, this.role); } @Test public void testFindUseraccountsByEmail() throws Exception { int expected = 1; int actual = wrap(service(Contacts.class)).findUseraccountsByEmail(this.uniqueEmail).size(); Assert.assertEquals(expected, actual); } } The actual value is '0' while I'm sure the requested object is inserted by the @Before-method and the query is all right. Is this an Isis issue or do I have to look for a Datanucleus/other solution? Thanks, Erik Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: [jira] [Commented] (ISIS-772) Reimplement WrapperFactory to use javassist instead of cglib/asm (for Java7 support)
Hi Dan. Many thanks for pointing this :-)) Excuse me I didn't read it before. All seems ok for us, but when you say that the modifyXXX cannot be invoked (as seen on the TodoItem.modifyDescription(...) test in [1]) this can break some code for us. Let me explain. We normally use: this.wrap(domainObject).setXXX(...); for setting properties. This way, if there's any logic associated when updating the property (by means of a modifyXXX(...) method), that business logic is always execute whereever it's called in the domain. When we see in the code something like: domainObject.setXXX(...); we know it's an error, unless there's a comment like this ones: // Always Disabled. domainObject.setXXX(...); or // Always Hidden. domainObject.setXXX(...); In those cases, if there's business logic associated, the only way to execute it is to explicitly invoke it as in: domainObject.modifyXXX(...); If that's forbidden now, is there a better way to solve this? Many thanks! Oscar [1] https://git-wip-us.apache.org/repos/asf?p=isis.git;a=blob;f=example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItemTest_description.java;h=11e5ae315f1bc33241658999d4178b06d65c1c9b;hb=074d2c4 El 02/05/2014, a las 19:37, Dan Haywood d...@haywood-associates.co.uk escribió: Hi all, Just a quick update on some recent commits [1], [2], [3]. (Oscar, take especial note, because of how you are wrap(...) all domain objects). The implementation of WrapperFactory uses cglib 2.x/asm 3.x, which is incompatible with Java 7. Although cglib 3/asm 4 are compatible, in the past we've had dependency convergence issues with these very popular libraries. So, I've been working through our dependencies on cglib and looking to replace them with javassist (JBoss' library). Specifically: - in our JMock mocking we used to use the cglib-based ClassImposterier; I've now implemented a new JavassistImposteriser - in WrapperFactoryDefault, this similarly has been changed to use Javassist. The original implementation is still available, renamed to WrapperFactoryCglib. We still have dependencies on cglib in ObjectFactoryCglib, but this is not used by the JDO Objectstore (it is to support lazy loading of the other not-released objectstores). And there was also a cglib/asm dependency in the Wicket viewer, which I've also removed. ~~~ So, this is just a heads-up that as of the next release WrapperFactoryDefault is using javassist under the covers. I also fixed one bug: the idea I had was to disallow calls to foo.modifyBar), even if such a method existed; instead only foo.setBar(...) must be called. This wasn't being checked for correctly. It won't impact your code if you don't use the modifyXxx() supporting method. ~~~ OK, that's it. Have a good weekend! Cheers Dan [1] https://issues.apache.org/jira/browse/ISIS-569 [2] https://issues.apache.org/jira/browse/ISIS-770 [3] https://issues.apache.org/jira/browse/ISIS-772 Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: java.lang.NullPointerException at org.datanucleus.ExecutionContextImpl.performManagedRelationships(ExecutionContextImpl.java:4003)
Just for others with the same problem. Seems there's a bug somewhere in DN, but there's an easy workaround. The situation generating the NPE was the following: Domain Entity: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) public class InformationSystem extends ApplicationComponent { // {{ ParentSystem (property) private InformationSystem parentSystem; @MemberOrder(sequence = 100) @Column(allowsNull = true) public InformationSystem getParentSystem() { return this.parentSystem; } public void setParentSystem(final InformationSystem partOfInformationSystem) { this.parentSystem = partOfInformationSystem; } // }} // {{ SubSystems (Collection) @Persistent(mappedBy = parentSystem, dependentElement = false) private SortedSetInformationSystem subSystems = new TreeSetInformationSystem(); @MemberOrder(sequence = 500) public SortedSetInformationSystem getSubSystems() { return this.subSystems; } public void setSubSystems(final SortedSetInformationSystem subSystems) { this.subSystems = subSystems; } // }} ... } Obviously, the exception is thrown because we are using managed relationships, so DN tries to keep synched both sides. That's relevant, because in this case we were trying to set the relationship as this: subSystem.setParentSystem(informationSystem); When executed, the previous line was causing the NPE on DataNucleus. If, instead, we update the bidir relationship with: informationSystem.getSubSystems().add(subSystem); It runs smoothly. As it was inside a Fixture, and we weren't wrapping the call, as in (an idiom we have adopted in all our domain code, unless properties/actions are hidden or disabled): wrapperFactory.wrap(subSystem).setParentSystem(informationSystem); The exception was thrown when persisting another entity, which in our case, also executes a this.getContainer().flush(), as any action executed inside a wrap(..). So, summarizing, when having a bidirectional 1-n relationship that must be automatically managed by DataNucleus, it's preferred to add to the parent's child collection, than set the parent on the child. HTH, Oscar El 29/04/2014, a las 23:13, Dan Haywood d...@haywood-associates.co.uk escribió: On 29 April 2014 21:34, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Yes... relMgr is what I find to be null... I noticed it sometimes worked, sometimes not... I thought about a limit in nested transactions or something similar... But I didn't noticed it was a ConcurrentMap. The only option seems the one you pointed. The Map has been cleared and not initialized on: if (getManageRelations() managedRelationDetails != null) { managedRelationDetails.clear(); } I think it's probably worth asking on the DN forum (Andy Jefferson). Say you work with me. He'll probably ask for a test case, but I guess you could explain that's intermittent and possibly a threading issue. Also, do note that we're not on the latest version of DN; very outside change that it's a bug that's been recently fixed. While trying as a workaround to hide the exception in a try - catch block, as in: // Send pending changes to the database. try { this.getContainer().flush(); } catch (final NullPointerException e) { // Do nothing... Seems there's a bug in DN when updating Managed // Relationships. // It only occurs sometimes (it's lacy loaded; it's a multi-threaded // ConcurrentMap. System.err.print(String.format(XMS - FLUSING ERROR !!!: %s, e.getStackTrace().toString())); } Then the Isis transaction was not in the correct state: Caused by: java.lang.IllegalStateException: state is: MUST_ABORT at org.apache.isis.core.commons.ensure.Ensure.ensureThatState(Ensure.java:111) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:363) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:311) at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:223) at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:229) Not sure how to deal with it ... Not sure I recommend this, but if you want to hack it, you could register a custom implementation of DomainObjectContainer that resets the IsisTransaction back to a good state (setState to IN_PROGRESS and setAbortCause to null. in isis.properties: isis.persistor.domain-object-container=org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault change as required... As I say, rather hacky, not sure it's to be recommended. Dan Óscar
Re: Using Isis with IntelliJ
Hi, Dan. Really nice :-)) On the last screenshot on [2] you refer to launch maven compile, but instead the screenshot shows datanucleus:enhance. Cheers, Oscar El 01/05/2014, a las 12:57, Dan Haywood d...@haywood-associates.co.uk escribió: Although I've used Eclipse for more than a decade, I've decided to switch (for a while at least) to using IntelliJ. The primary reason is to better support those in the community who prefer IntelliJ, so we can have resources to help IntelliJ afficianados get started quickly with Isis. The secondary reason is that I also use Resharper on .NET and will probably use WebStorm for Javascript development, and JetBrains sensibly use the same key bindings for all their products. So, in line with all that, I've just updated our Eclipse templates as IntelliJ live templates; see [1]. I've also recorded a screencast explaining how to run apps from IntelliJ. When running in Eclipse, it's necessary to use the DataNucleus plugin to enhance the bytecode. In IntelliJ, although there is aIso a DN plugin, I found a way to configure to run the app without any needing the plugin. More info here [2], and a variation to show IntelliJ with JRebel here [3]. Finally, I also noticed that our cheat sheet was out of date, so I've updated that too [4]. Any feedback, please post here. Cheers Dan [1] http://isis.apache.org/intro/resources/editor-templates.html [2] http://isis.apache.org/intro/getting-started/ide/intellij.html [3] http://isis.apache.org/other/jrebel.html [4] http://isis.apache.org/intro/resources/cheat-sheet.html Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 2, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou http://es.linkedin.com/in/oscarbou http://www.GesConsultor.com Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
When finalizing a test - javax.jdo.JDOException: Unexpected error during precommit
Hi to all. I have an Asset entity with inserted() and updated() lifecycle callback methods. Inside that updated() method, I have the following code: public void updated() { this.insertOrUpdateRelationships(); } public void persisted() { this.insertOrUpdateRelationships(); } private void insertOrUpdateRelationships() { // Insert/Update Relationships. for (final Relationship current : this.relationshipsDerivedFromAnnnotations()) { this.wrap(current.getSourceAsset()).addDirectlyImpactedAsset(current.getTargetAsset(), current.getType()); } } When executed inside a test, the following exception is thrown right after finalizing the Test method (no exceptions thrown while in the Test body): javax.jdo.JDOException: Unexpected error during precommit at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:596) at org.datanucleus.api.jdo.JDOTransaction.commit(JDOTransaction.java:165) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.commitJdoTransaction(DataNucleusObjectStore.java:278) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.endTransaction(DataNucleusObjectStore.java:260) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endTransaction(IsisTransactionManager.java:406) at org.apache.isis.core.integtestsupport.IsisSystemForTest.commitTran(IsisSystemForTest.java:610) at org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:164) at org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:149) at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) NestedThrowablesStackTrace: java.lang.RuntimeException: org.apache.isis.core.metamodel.spec.DomainModelException: Callback failed. Calling UpdatedCallbackFacetViaMethod[type=UpdatedCallbackFacet,methods=[public void com.xms.framework.architecture.domain.model.Asset.updated()]] on PojoAdapter@6dc5f0ba[PR~:com.xms.framework.architecture.domain.model.business.extensions.product.Product:L_0,specification=Product,version=null,pojo-toString= [name=Product, [tenantId=301, [id=2ED03E03-2894-485B-8491-CE88230788B2, class name=com.xms.framework.architecture.domain.model.business.extensions.product.Product]]],pojo-hash=#64164b49] at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:278) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:287) at org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.postStoreProcessingFor(FrameworkSynchronizer.java:140) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$2.doRun(IsisLifecycleListener.java:95) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$RunnableAbstract.run(IsisLifecycleListener.java:201) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.withLogging(IsisLifecycleListener.java:180) at org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.postStore(IsisLifecycleListener.java:91) at
java.lang.NullPointerException at org.datanucleus.ExecutionContextImpl.performManagedRelationships(ExecutionContextImpl.java:4003)
Hi to all. I'm experimenting an exception, without having any idea about its source. It always happens in the context of the same class, that it's annotated with @PersistenceCapable. Seems DataNucleus tries to automatically manage its relationships (by adding elements to the collection, etc.) and it can't. Not sure if it's a DN problem, or an Isis related one ... Any ideas about how to advance on the resolution? Many thanks!!! java.lang.RuntimeException: java.lang.NullPointerException at org.apache.isis.core.integtestsupport.IsisSystemForTest.setUpSystem(IsisSystemForTest.java:284) at com.xms.framework.risk.integration.RiskSystemInitializerWithBCMFixture.initIsft(RiskSystemInitializerWithBCMFixture.java:70) at com.xms.framework.risk.integration.RiskIntegTestAbstractWithBCMFixture.initClass(RiskIntegTestAbstractWithBCMFixture.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.NullPointerException at org.datanucleus.ExecutionContextImpl.performManagedRelationships(ExecutionContextImpl.java:4003) at org.datanucleus.ExecutionContextImpl.flush(ExecutionContextImpl.java:4067) at org.datanucleus.api.jdo.JDOPersistenceManager.flush(JDOPersistenceManager.java:2010) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:363) at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:355) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:420) at org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:369) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:311) at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:223) at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:229) at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.persist(AbstractXMSDomainObjectRepositoryAndFactory.java:59) at com.xms.framework.architecture.domain.model.valuation.ConsequenceByDimensionAndCriterionMatrices.createMatrix(ConsequenceByDimensionAndCriterionMatrices.java:18) at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:178) at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57) at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54) at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223) at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54) at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342) at
Re: BDD tests speed improvement with DN options
Hi Dan.I have the following alternatives:- Create a new descendant of IsisConfigurationDefault for tests (IsisConfigurationDefaultForTests) with those properties added by default.- Directly modifyIsisConfigurationDefault to add them by default.As it's a private method defined on each SystemInitializer I don't see any other "generic" way...El 10/03/2014, a las 11:11, Dan Haywood d...@haywood-associates.co.uk escribió:Hi Oscar,Thanks for this, makes sense.Could you raise a ticket and make the commit... it looks simple enough.And, perhaps, add a short page to our website (somewhere under core/bdd, Iguess).CheersDanOn Monday, 10 March 2014, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote:Hi to all,Just to let others now.Our BDD test suites are becoming quite large and we were experiencing longexecution times when running them.They can be greatly improved simply by configuring DataNucleus to notvalidate tables and indexes. As all the schema is recreated on eachfeature, seems not necessary.For that, simply add on the SystemInitializer the following lines:private IsisConfiguration testConfiguration() { final IsisConfigurationDefault testConfiguration = newIsisConfigurationDefault(); // Don't do validations that consume setup time.testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema","true");testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.validateTables","false");testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.validateConstraints","false");HTH,OscarÓscar Bou BouResponsable de ProductoAuditor Jefe de Certificación ISO 27001 en BSICISA, CRISC, APMG ISO 2, ITIL-F902 900 231 / 620 267 520http://www.twitter.com/oscarbouhttp://es.linkedin.com/in/oscarbouhttp://www.GesConsultor.comEste mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. ,Paseode laCastellana, 153 bajo - 28046 (Madrid), yAvda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
BDD tests speed improvement with DN options
Hi to all, Just to let others now. Our BDD test suites are becoming quite large and we were experiencing long execution times when running them. They can be greatly improved simply by configuring DataNucleus to not validate tables and indexes. As all the schema is recreated on each feature, seems not necessary. For that, simply add on the SystemInitializer the following lines: private IsisConfiguration testConfiguration() { final IsisConfigurationDefault testConfiguration = new IsisConfigurationDefault(); // Don't do validations that consume setup time. testConfiguration.add(isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema, true); testConfiguration.add(isis.persistor.datanucleus.impl.datanucleus.validateTables, false); testConfiguration.add(isis.persistor.datanucleus.impl.datanucleus.validateConstraints, false); HTH, Oscar
Re: Information for Google Summer of Code 2014
Hi to all.There can be more general-purpose integrations if we generalize some implementation over Apache Camel [1] components [2].Also, another really useful (and cool ;-) platforms for automation would be:- Twilio [3] (for voice calls, SMS messaging, etc.).- Zapier [4] (automates more than 250 apps).- ITTT [5] (similar to Zapier).I'm sure there are plenty of scenarios that could benefit the most "traditional" applications (for example, by integrating with Evernote, etc.).[1]https://camel.apache.org[2]https://camel.apache.org/components.html[3]https://www.twilio.com[4] https://zapier.com[5] http://ittt.comEl 06/03/2014, a las 09:09, Dan Haywood d...@haywood-associates.co.uk escribió:I'm cc'ing users@ on this, since there might be folk there who would chipin...On 6 March 2014 00:16, Eshan Sudharaka esudhar...@gmail.com wrote:Hi Dan,I went through some documentation and got some very basic understandingabout Apache ISIS. And I build that toDo app and try went through the appcode.I am interested in developing following Project Idea.- to build some new off-the-shelf domain services, like the current Exceland Word mail merge ones- eg email- eg SMSing- eg Drools rules engineSo the idea is to build a generic service which can be used across the allof apps developing using ISIS. can you please provide some further detailson this.Is it similar tohttp://isis.apache.org/reference/services/command-context.html ? ProvidingAPI for get above services.Yes, it's similar in concept.I think the closest existing services are actually the domain services Ihave on my github repo for Word, Excel and String interpolation [1], [2],[3].I think it'd also be worthwhile providing some domain entities (mapped tobe persistent with JDO) to represent the domain concepts, for example anEmailTemplate or SmsMessageTemplate. This could become an all-purpose"communication channel" module for others to reuse. Note that Estatio [4]already provides a Links repo/Link entity that leverages [3].The JDO implementation of the CommandService and BackgroundService [4],[5](as used by the command-context service that you referenced) has supportfor this with the CommandJdo entity. Similarly the JDO impl ofAuditingService provides an AuditEntryJdo entity [6], and the JDO impl ofPublishingService provides a PublishedEventJdo entity [7]. So there areplenty of examples to work from.I have less things to say about the Drools rules engine, but I'm sure it'dbe useful. Oscar's project has done some sort of integration, so perhapsthere are ideas there that could be generalised. Oscar?My only concern about this project is whether it is large enough in scopeto fill up an entire summer. I wrote the string interpolation service [3]in an evening, for example, and the Links/Link service in Estatio only tooka couple more hours. But maybe an all-purpose comms channel module plusa rules engine service (with additional entities to administer the rulesthemselves) might be big enough.HTHDan[1]https://github.com/danhaywood/isis-domainservice-docx[2]https://github.com/danhaywood/isis-domainservice-excel[3]https://github.com/danhaywood/isis-domainservice-stringinterpolator[4]https://github.com/estatio/estatio[5]http://isis.apache.org/components/objectstores/jdo/services/command-service-jdo.html[6]http://isis.apache.org/components/objectstores/jdo/services/background-command-service-jdo.html[7]http://isis.apache.org/components/objectstores/jdo/services/auditing-service-jdo.html[8]http://isis.apache.org/components/objectstores/jdo/services/publishing-service-jdo.htmlThanksOn Fri, Feb 28, 2014 at 3:42 PM, Dan Haywoodd...@haywood-associates.co.ukwrote:Hi Eshan,Thanks for your interest in GSOC and in Isis itself, of course.We had two students last year, and I mentored them (with Maurizio asco-mentor); they both built a viewer against the Restful Objectsinterface[1], [2].I must admit though that I had intended to skip mentoring a GSOC projectthis year, and I don't think any of the other committers are interested(speak up if no!)That's not to say I don't have several ideas for projects, for example:- build a "real-life" app in some suitable domain, along with asemi-academic write-up of their learnings - to would give us another substantial example app, along with somemarketing material about how learnable Isis- documentation: develop screencasts for all the various features that wehave - cos people would rather watch youtube than read- to build some new off-the-shelf domain services, like the current Exceland Word mail merge ones- eg email- eg SMSing- eg Drools rules engine- to develop an integration with Lucene, for full text-search across thedomain- I don't think this is a full summer's work though- to develop an oAuth integration- probably not a full summer's work though (even though I'm not exactlysure what an oAuth integration actually is)- to write a clean-room implementation of a JDO enhancer, as areplacementfor the DN one, and that ideally integrates with the JRebel plugin-
Re: just put together a little string interpolation service...
Hi, Dan. This is really interesting... I didn't knew about OGNL and have found it has not only object graph navigation, but also iteration over Collections, variables and other really useful methods [1] As a reporting server, are Jeroen and you planning to use simply templates made in Word, for example? We could also plan to use it and contribute. Many thanks, Oscar [1] http://commons.apache.org/proper/commons-ognl/language-guide.html El 25/02/2014, a las 09:04, Dan Haywood d...@haywood-associates.co.uk escribió: ... which Estatio is gonna use to build URLs off to a report server. More info at [1] Dan [1] http://isis.apache.org/reference/services/third-party/danhaywood-isis-domainservice-stringinterpolator.html
Re: just put together a little string interpolation service...
Many thanks, Dan. I didn't notice it! As per the code in asInputHtml(ToDoItem toDoItem) seems that instead of using something like OGNL or SpEL the developer must explicitly add the referenced properties, isn't it? Seems that the links to the doc example [1], html example [2], and the generated doc example [3] are broken. [1] https://github.com/danhaywood/isis-domainservice-docx/blob/master/src/test/resources/com/danhaywood/isis/domainservice/docx/TypicalDocument.docx?raw=true [2] https://github.com/danhaywood/isis-domainservice-docx/blob/master/src/test/resources/com/danhaywood/isis/domainservice/docx/ExampleGenerated.docx?raw=true [3] https://github.com/danhaywood/isis-domainservice-docx/blob/master/src/test/resources/com/danhaywood/isis/domainservice/docx/ExampleGenerated.docx?raw=true El 25/02/2014, a las 10:46, Dan Haywood d...@haywood-associates.co.uk escribió: On 25 February 2014 09:36, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: As a reporting server, are Jeroen and you planning to use simply templates made in Word, for example? No, Jeroen already has a bunch of reports defined using SQL Server Reporting Services [2], so we're just pointing to those. But if you want to do mail merges in Word, do look at the other service I wrote a while back [3] We could also plan to use it and contribute. All contributions/enhancements welcome, of course! Cheers Dan Many thanks, Oscar [1] http://commons.apache.org/proper/commons-ognl/language-guide.html [2] http://technet.microsoft.com/en-us/library/ms159106.aspx [3] https://github.com/danhaywood/isis-domainservice-docx +
Re: just put together a little string interpolation service...
Perhaps passing as parameters an entity that allows to access all Domain Services (such as the this.service(xxx) method on BDD Tests). From services, we could access and reference the whole domain ... El 25/02/2014, a las 12:16, Dan Haywood d...@haywood-associates.co.uk escribió: On 25 February 2014 11:13, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: I didn't notice it! As per the code in asInputHtml(ToDoItem toDoItem) seems that instead of using something like OGNL or SpEL the developer must explicitly add the referenced properties, isn't it? yeah, it's a difficult problem to solve in a generic fashion. At some point something needs to know how to assemble the data to feed into the mail merge. If you think of a better way (eg some higher level service that has this responsibilty), let me know! Seems that the links to the doc example [1], html example [2], and the generated doc example [3] are broken. thx, will fix. [1] https://github.com/danhaywood/isis-domainservice-docx/blob/master/src/test/resources/com/danhaywood/isis/domainservice/docx/TypicalDocument.docx?raw=true [2] https://github.com/danhaywood/isis-domainservice-docx/blob/master/src/test/resources/com/danhaywood/isis/domainservice/docx/ExampleGenerated.docx?raw=true [3] https://github.com/danhaywood/isis-domainservice-docx/blob/master/src/test/resources/com/danhaywood/isis/domainservice/docx/ExampleGenerated.docx?raw=true
Re: Isis and Drools
Hi Ged.Welcome to the Isis group.I'm the one who posted that question and it was solved at that time.Currently, we have a Bounded Context that has been implemented with Isis for the Domain Entities, and Drools for the Business Rules.And the news is that it works good :-)There are some points to take into account.It's a commercial project and we cannot reveal the source code, but if you start with a small prototype using Drools and Isis and publish it anywhere (github? bitbucket?), we can support you to make it run, and it can also be used as another Isis example project.So no crazy at all!HTH,OscarEl 24/02/2014, a las 17:56, Ged Byrne ged.by...@gmail.com escribió:Hi All,Has anybody done anything with Drools and Isis.With version 5 JBoss introduced the ability to work with POJOs and JPAentities as facts.Now Drools 5 has taken POJO programming simplicity to its next level byallowing programmers to insert POJOs as *facts* directly into a knowledgesession, or what a rule engine terms "working memory." This articleintroduces a cost-effective and un-intrusive approach that manipulates JPAentities as facts in Drools working memory. Continuous, real-time dataprofiling has never been so easy.http://www.ibm.com/developerworks/opensource/library/j-drools5/index.htmlI'd like to experiment with the idea of adding Isis entities as facts, andkeeping them connected. Potentially connecting ISIS business rules supportwith Drools and delegate see/use/do decisions to the session.Is this all crazy talk?Has anybody tried anything like this?Does anybody have any pointers?I note with interest this post from November:http://comments.gmane.org/gmane.comp.apache.incubator.isis.user/1076I'm very grateful for the group's support.GedÓscar Bou BouResponsable de ProductoAuditor Jefe de Certificación ISO 27001 en BSICISA, CRISC, APMG ISO 2, ITIL-F902 900 231 / 620 267 520http://www.twitter.com/oscarbouhttp://es.linkedin.com/in/oscarbouhttp://www.GesConsultor.comEste mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. ,Paseode laCastellana, 153 bajo - 28046 (Madrid), yAvda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: New screencast on bulk updates using the Excel domain service
Hi, Dan.Really nice way to update domain entities from Excel!There are plenty of use cases where users can speed up by updating fields massively through Excel.And the ability to control the business logic applied on those updates by working through view models instead of the original domain entities is simply great.Many Thanks!El 16/02/2014, a las 16:51, Dan Haywood d...@haywood-associates.co.uk escribió:Hi folks,just a heads-up that the Isis website now contains a new page andscreencast [1] showing how Estatio [2] uses the Excel domainservice [3]that I recently put together.I've also updated some of the existing pages which have screencasts forthem, and updated the main documentation page [4] so it is easier (througha little icon) to see which pages have screencasts on them.Any feedback (positive or negative) let me knowCheersDanPS: hoping to do a 1.4.0 release this coming week.[1]http://isis.apache.org/reference/services/third-party/danhaywood-isis-domainservice-excel.html[2] https://github.com/estatio/estatio[3] https://github.com/danhaywood/isis-domainservice-excel[4] http://isis.apache.org/documentation.htmlÓscar Bou BouResponsable de ProductoAuditor Jefe de Certificación ISO 27001 en BSICISA, CRISC, APMG ISO 2, ITIL-F902 900 231 / 620 267 520http://www.twitter.com/oscarbouhttp://es.linkedin.com/in/oscarbouhttp://www.GesConsultor.comEste mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. ,Paseode laCastellana, 153 bajo - 28046 (Madrid), yAvda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: Integration Tests
Hi,Dharmesh.Have you annotated the .feature file with ...?@TopUpCardDetailsServiceFixtureWhen that annotation is found on a feature file is when the fixture is loaded.If you put a breakpoint on thescenarioExecution().install(new TopUpCardDetailsServiceFixture());does it stop?Regards,OscarEl 14/02/2014, a las 15:21, Chohan, Dharmesh dharmesh.cho...@atos.net escribió:HiI have written some fixtures which I need install during integration tests. Couple of fixtures work during integration tests but the rest does not install the fixture.I have added the fixtures in the CatalogOfFixturesGlue.java file. For example@Before(value={"@integration", "@TopUpCardDetailsServiceFixture"}, order=2) public void integrationFixtures() throws Throwable { scenarioExecution().install(new TopUpCardDetailsServiceFixture()); }Please can someone advice what is happening. Or provide a help link on how to configure integration tests.Thanks in advance.DharmeshÓscar Bou BouResponsable de ProductoAuditor Jefe de Certificación ISO 27001 en BSICISA, CRISC, APMG ISO 2, ITIL-F902 900 231 / 620 267 520http://www.twitter.com/oscarbouhttp://es.linkedin.com/in/oscarbouhttp://www.GesConsultor.comEste mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. ,Paseode laCastellana, 153 bajo - 28046 (Madrid), yAvda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Re: JRebel support
Hi, Dan. OK, I noticed this issue today as well, while demo'ing something to Jeroen. Not sure why this didn't show up for me before, but I've just committed and pushed a change which hopefully fixes. Let me know how you get on... I've recompiled Isis and now I can add actions, modify their signature, and runs perfectly !!! El 04/02/2014, a las 01:00, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: ~~~ Whatever, there's definitely something broken with the DN enhancer plugin. But I don't think there's any ticket open on the DataNucleus JIRA for Andy to look into. My suspicion is that he would want a clearly defined reproducable issue, which I don't know that we have at the moment. Another avenue might be to see if Andy would provide an in-memory API so that the enhancement can be performed within the JRebel plugin itself. That would then let us eliminate the DN plugin completely. I don't have neither a clear case, and sure it's something broken ... Working a bit at least on an Isis project (like Estatio) I'm sure he can find a case... The abstract class is in one module, and concrete classes on another. I also suspect that having more than 1 domain module can raise to a higher number of enhancement problems, but since now we could handle them. The in-memory API would be perfect, as it would also allow to implement the same solution also on the BDD SystemInitializer (or some other BDD component). That's the main point where we are suffering those DN Enhancer problems. A new programmer joined the team 2 weeks ago. It became productive nearly immediatly, simply writing BDD tests and the entities and actions derived from that. He had no need to see the web UI and I was confident that all was ok. That's Isis :-)) But the biggest disappointment is the DN Enhancer failures... No, that's fine... and I'm glad that's working for you. For Isis 2.0 (which I'm starting to think about), was mulling over the idea that this every pojo would always be enhanced in a similar way, so that it can provide access to its Oid and ObjectAdapter, such that it is self-describing. Will probably use javassist rather than cglib, though (as I'm using for the new @RequestScoped services). Seems interesting... But perhaps always enhanced entities would be harder to debug? I suspect it can conflict with some common technologies, but not sure... For me, using the wrapper is just enough. Or simply due to some misspelling... Because see that eventOccurrence.class name is misspelled. On the filesystem the first character is in uppercase: EventOccurrence.class ...Yes, I think that's more likely. If you are on Windows, then (because it is case preserving but case insensitive), it'll mask this error. At any rate, you should fix it. But the point is that I'm in Mac, other mates on Windows, and the file is properly spelled (in uppercase). Seems that it's JRebel or the plugin what is misspelling the class filename? But that's only when initializing... After that phase, all seems to work ok. The misspelling exception was shown for all classes imported by that Drools rules file that was created on the Service initialization. OK, I noticed this issue today as well, while demo'ing something to Jeroen. Not sure why this didn't show up for me before, but I've just committed and pushed a change which hopefully fixes. Let me know how you get on... I'll recompile and try it again. PS: one other thing to raise: JRebel seems to be quite slow in loading classes. But - even though I have rebel.xml set up to just reload the domain classes - it seems to monitor everything (ie all of the Isis classes too), which probably explains the slowness. The JRebel docs [1] suggest that it is possible to filter using an include tag, but it doesn't seem to work for me. Interesting in knowing how you get on with it. [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include I also noticed that class reloading was also slow... Thanks for the link. I'll play with those options. Thanks again, Oscar El 04/02/2014, a las 00:17, Dan Haywood d...@haywood-associates.co.uk escribió: On 3 February 2014 17:03, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: We find DN enhancer problems quite a lot (nearly on each BDD execution): - This one regarding abstract classes. - Another quite common regarding duplicated fields (jdoXXX fields). Both of them are solved by slightly changing the class and forcing Eclipse to recompile and the DN enhancer to run. So it's an old friend. Be sure I'm not trying to manually instantiate it. OK... Jeroen and I see the second, must admit haven't seen the first. I've run the enhancer again before executing the webapp and on this last execution finally seems solved (we have 4-5 dom modules, similar
Re: Fast workflow on Isis
Thanks a lot, Dan!It's going to be of great help. Let's license and try it.El 22/01/2014, a las 23:42, Dan Haywood d...@haywood-associates.co.uk escribió:OK, then.https://github.com/danhaywood/isis-jrebel-pluginYou'll need to use build from source for the moment.My limited testing shows that it works for the "simple" app, but I've nottried it out on anything bigger like Estatio.But try it out (and I'll put a screencast together for this, since Isuspect it might be popular...)On 18 January 2014 18:55, GESCONSULTOR o@gesconsultor.com wrote:Really nice!Another time-saving feature of Isis, like the auto-generated UI,persistence support, BDD and unit tests integration,etc.Our time can be spent thinking, implementing and testing the domain modelat least a 80%, without loosing it with dev or deployment infrastructureops!El 18/01/2014, a las 17:46, Dan Haywood d...@haywood-associates.co.ukescribió:Been doing some further experiments on JRebel, so as a quick update, I*think* it's doable, but requires a small enhancement to DataNucleus.For further reading, see [1] and [2][1] https://issues.apache.org/jira/browse/ISIS-651[2] http://www.datanucleus.org/servlet/jira/browse/NUCCORE-1104On 10 January 2014 17:46, GESCONSULTOR o@gesconsultor.com wrote:Many Thanks for moving forward this, Dan.It can really boost our productivity.For what I've read JRebel is the best way. It was just an alternativefound.El 10/01/2014, a las 17:54, Dan Haywood d...@haywood-associates.co.ukescribió:On 27 December 2013 23:12, GESCONSULTOR - Óscar Bouo@gesconsultor.comwrote:Hi to all.Dan, some days ago you commented the possibility to accelerate theworkflow by integrating with JRebel.Just to mention, seems on the Ninja Framework they have achievedsomethingsimilar as detailed in [1].This functionality is introduced at [2], where it references anarticlein[3].Perhaps it's a different approach to accelerate the Isis workflow.Thanks for this, Oscar.However, in [1], they say:*You start Ninja’s SuperDevMode in a console. Then you edit a Java fileinyour IDE and save it. Your IDE will then compile your Java file to aclassfile. Ninja’s SuperDevMode recognizes that and restarts Ninja within asecond. You can then switch to your browser and verify that yourchangeswork at http://localhost:8080 http://localhost:8080/ . *So I don't think this will work, because Isis takes rather longer thanasecond to build up its metamodel.I'm pretty certain that JRebel is the right way to go ... I spoke tooneoftheir evangelists at a conference in November, so reckon it'll work.Wecan invalidate Isis' metamodel ok (theDeveloperUtilitiesServiceDefault#refreshLayout() method), the only realunknown is how to invalidate the DN metamodel similarly.Let me go ask Andy Jefferson about that...DanHTH,Oscar[1] http://www.ninjaframework.org/documentation/super_dev_mode.html[2] http://www.ninjaframework.org/documentation/getting_started.html[3]http://java.jiderhamn.se/2011/12/11/classloader-leaks-i-how-to-find-classloader-leaks-with-eclipse-memory-analyser-mat/Óscar Bou BouResponsable de ProductoAuditor Jefe de Certificación ISO 27001 en BSICISA, CRISC, APMG ISO 2, ITIL-F902 900 231 / 620 267 520http://www.twitter.com/oscarbouhttp://es.linkedin.com/in/oscarbouhttp://www.GesConsultor.comEste mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. ,Paseode laCastellana, 153 bajo - 28046 (Madrid), yAvda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
Apache Isis IDE configuration
Just to point others, to maximize their experience while programming with Apache Isis, I've just discovered a post by Dan regarding his configuration on Eclipse Juno at [1]. I've had installed the Apache Isis IDE plugin for Eclipse since quite time ago, and it works quite well on Juno (seems there's a compatibility issue regarding junit with Kepler). There are links to Apache Isis code templates for Eclipse but also some nice utils like the EclEcmma plugin that I didn't knew about. By configuring the Coffe Bytes code-folding as explained on [2], if you use the Isis markers // {{ and // }}, code starts to become better organized. HTH, Oscar [1] http://danhaywood.com/2012/09/20/eclipse-juno-jee-setup/ [2] https://github.com/danhaywood/apache-isis-ide
Re: Estatio - DataStore identity
I was just comparing our model with yours. Many thanks for publishing Estatio. There are a lot of things we have used (and learnt)... El 13/01/2014, a las 16:30, Jeroen van der Wal jer...@stromboli.it escribió: Hi Oscar, Thanks for pointing to this, there's definitely room for improvement in this area. I will start some refactoring tomorrow and will let you know whether @Version could also be moved up in the hierarchy. Let me know if you have further feedback. Cheers, Jeroen When we started with JDO we didn't On Sun, Jan 12, 2014 at 7:11 PM, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Hi, Jeroen. I've seen on Estatio that the following annotations are repeat for each class, despite you have a base class defined (EstatioMutableObject): @javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE) @javax.jdo.annotations.DatastoreIdentity( strategy = IdGeneratorStrategy.NATIVE, column = id) As per [1], seems that it's just enough to annotate just the base class. Citing: When you have an inheritance hierarchy, you should specify the identity type in the base class for the inheritance tree. This is then used for all persistent classes in the tree. What I'm not finding on the DataNucleus documentation any explicit reference that indicates whether: @javax.jdo.annotations.Version( strategy = VersionStrategy.VERSION_NUMBER, column = version) must be annotated on each class on a hierarchy, or it's just enough to annotate the base class. Same happens with: @javax.jdo.annotations.Discriminator( strategy = DiscriminatorStrategy.CLASS_NAME, column=discriminator) Does it respond to any hidden issue with JDO, DataNucleus, etc.? Perhaps it would be enough to just annotate EstatioMutableObject. Thanks, Oscar [1] http://www.datanucleus.org/products/datanucleus/jdo/datastore_identity.html
Wavemaker also moving to AngularJS
As I've told sometimes, we've adapter a custom viewer we developed over Wavemaker for Apache Isis. It offers us the advantage of a Visual Web IDE, really similar to Access (you can see the video on [1]). In that way, with Isis we greatly reinforced the Domain, while we can use standard interfaces or visually create new ones directly from the browser for entities, actions, etc. They have been Apache licensed all versions until now, but seems that want to create a new Enterprise version for the upcoming version (I ignore if the community will still be Apache licensed; if so, for us it would be a great option to maintain it as our current viewer). Just to let you know, they also have decided to migrate from Dojo to AngularJS ([2]). So it's just another input about that decision. Regards, Oscar [1] http://www.youtube.com/watch?v=srd70WvvXmw [2] http://dev.wavemaker.com/blog/2014/01/08/happy-new-year-wavemaker-community/
Re: ISIS and JDO: Multiple fields(FK's and PK) using same column throws not-null constraint for PK
Hi Varma, A different approach could be to try the org_id as the multi-tenant discriminator. See [1] [1] http://www.datanucleus.org/products/accessplatform_3_1/jdo/multitenancy.html You can also disable that behavior for those classes that doesn't depend on the organization. I've not tested it on Isis. HTH, Oscar El 07/01/2014, a las 12:44, chittari.va...@wipro.com escribió: Hi Jeroen, Please find below the legacy table schema definition: CREATE TABLE om_site ( site_id character varying(80) NOT NULL, org_id character varying(18) NOT NULL, site_name character varying(45), site_desc character varying(60), site_type character varying(45) NOT NULL, -- Type of the site. Can be CAMPUS or BUILDING address_id character varying(10), location_id character varying(80), change_by character varying(60) NOT NULL DEFAULT 'System/Admin'::character varying, change_dt timestamp without time zone NOT NULL, CONSTRAINT om_site_pk PRIMARY KEY (site_id, org_id), CONSTRAINT om_site_address_id FOREIGN KEY (address_id, org_id) REFERENCES om_address (address_id, org_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT om_site_factility_org_fk FOREIGN KEY (location_id, org_id) REFERENCES om_geo_location (location_id, org_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) I have to get this schema in synch with JDO entity mapping. [Jeroen]: @Column defines the column into which a field is persisted. I can't see why you want to use the same column for three fields [Varma]: Because org_id column at the database side is being used in three constraints (om_site_pk, om_site_address_id, om_site_factility_org_fk) [Jeroen]: If you don't want to store the address_id on OmSite you can use the @Persistent(mappedBy=OmSite field on OmAddress) [Varma]: OmSite and OmAddress are related as ManyToOne and bidirectional, so in OmAddress I have SetOmSite sites with annotation @Persistent (mappedby=omAddress). And I want to store address_id in om_site table only as a foreign key. Same case is with the other FK field Note: The DDL is legacy one, so it could not be changed. This is a valid scenario at RDBMS side This kind of mapping works with JPA where in same column can be used as for the fields above. I tested its working fine(JPA/Hibernate out of ISIS environment) And also I tried to resolve this issue by adding a column unique rowsequence_id(not PK) in om_address table, and at om_site foreign key is changed to refer to that unique rowsequence_id which is not PK. But JDO did not allow this as FK should refer to PK field only. This is really annoying as this is also valid at RDBMS side but not at JPA/JDO side. BR Ranganath Varma BR Ranganath Varma -Original Message- From: Jeroen van der Wal [mailto:jer...@stromboli.it] Sent: Tuesday, January 07, 2014 4:48 PM To: users Subject: Re: ISIS and JDO: Multiple fields(FK's and PK) using same column throws not-null constraint for PK @Column defines the column into which a field is persisted. I can't see why you want to use the same column for three fields. If you don't want to store the address_id on OmSite you can use the @Persistent(mappedBy=OmSite field on OmAddress) annotation [1]. HTH [1] http://www.datanucleus.org/products/accessplatform/jdo/orm/one_to_one.html On Tue, Jan 7, 2014 at 11:54 AM, chittari.va...@wipro.com wrote: Consider this following scenario: public class OmSite implements java.io.Serializable { //OmSitePK.class is also created as per the specifications //for these two fields. No issue with that @Persistent(primaryKey = true, dependent = false) @Column(allowsNull = false, name = site_id) private String siteId; @Persistent(primaryKey = true, dependent = false) @Column(allowsNull = false, name = org_id) private String orgId; @Persistent(columns = {@Column(name=address_id, target = address_id), @Column(name=org_id, target = org_id)}) @Optional private OmAddress omAddress; @Persistent(columns = { @Column(name = location_id), @Column(name = org_id)}) @Optional private OmGeoLocation omGeoLocation; //Corresponding PK classes also created as per the specifications. //getters and setters } Here I have 1 composite PK(site_id, org_id), 2 composite FK's OmGeoLocation(location_id,org_id), OmAddress(address_id, org_id). As you can see same column org_id is being used/referred at 3 places With this mapping, when OmSite is constructed with its PK fields(orgId, siteId) and other mandatory fields. But not FK fields(omGeoLocation, omAddress), I have got not-null constraint error for one of the fields in compiste PK that is org_id. And when I construct OmSite by setting FKS (omGeoLocation, omAddress)also with org_id being same accorss PK and FK's, org_id value is being sent to Database. I suspect that org_id column is set when all the fields are
Re: Application Identity: Issue with Compsite PK class with multiple attributes.
This one seems more related to the OID Marshaller than with JDO. Perhaps Dan can give some light on it. El 03/01/2014, a las 10:14, chittari.va...@wipro.com escribió: I am using ISIS 1.3.0 with JDO 3.0.1, Data Nucleus 3.2.4 Using JDO Application Identity strategy, I have a composite PK class with two attributes(PK fields of type String). As per the JDO specifications, PK class has overridden the following methods: hascode, equals and toString. And it has Constructor which takes String parameter. Problem is that for some Entities OID is not found if any of the PK fields has the same character which is used to join in the toString method For example: Consider the below PK class: public class OmGeoLocationPK implements java.io.Serializable { public String locationId; public String orgId; public OmGeoLocationPK() { } public OmGeoLocationPK(String locationId, String orgId) { this.locationId = locationId; this.orgId = orgId; } public OmGeoLocationPK(String key){ StringTokenizer token = new StringTokenizer(key, _); this.locationId = token.nextToken(); this.orgId = token.nextToken(); } public String getLocationId() { return this.locationId; } public void setLocationId(String locationId) { this.locationId = locationId; } public String getOrgId() { return this.orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } public String toString() { return + locationId + _ + this.orgId; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((locationId == null) ? 0 : locationId.hashCode()); result = prime * result + ((orgId == null) ? 0 : orgId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; OmGeoLocationPK other = (OmGeoLocationPK) obj; if (locationId == null) { if (other.locationId != null) return false; } else if (!locationId.equals(other.locationId)) return false; if (orgId == null) { if (other.orgId != null) return false; } else if (!orgId.equals(other.orgId)) return false; return true; } } Here in the toString method _ character used to join two PK fields (locationId and orgId). So, if locationId or orgId has the chracter _ in its S tring value, Splitting with StringTokenizer is not evaluating the correct PK feilds values and it throws the following exception: Caused by: org.apache.isis.core.runtime.persistence.ObjectNotFoundException: Object not found in store with oid OmSite:com.wipro.wess.OmGeoLocationPK_ORG_FILTER_TEST_ATL at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:308) at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Type$2.recreateAdapter(ObjectAdapterMemento.java:112) at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Type.getAdapter(ObjectAdapterMemento.java:183) at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento.getObjectAdapter(ObjectAdapterMemento.java:301) at org.apache.isis.viewer.wicket.ui.components.widgets.entitylink.EntityLinkSelect2Panel.onSelected(EntityLinkSelect2Panel.java:328) at org.apache.isis.viewer.wicket.ui.components.widgets.entitylink.EntityLinkSelect2Panel.convertInput(EntityLinkSelect2Panel.java:156) at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1137) at org.apache.wicket.markup.html.form.Form$16.validate(Form.java:1862) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:177) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:161) at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274) at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262) at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262) at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262) at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262) at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262) at
Re: ISIS with JPA
Due to our project timeframes we cannot leader this effort, but as we have working with both JDO and JPA we can also provide support for it if needed (pointing to equivalent annotations, ways of doing things, etc.). HTH, Oscar El 07/01/2014, a las 08:14, Dan Haywood d...@haywood-associates.co.uk escribió: On 6 January 2014 11:29, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: ... There's no guide as it would be needed to implement something equivalent to the isis-objectstore-jdo [1]. Perhaps Jeroen or Dan can give you an estimate about the effort it would require. I reckon it'd take about 30 days work for me to implement. But the main issue is freeing up the time to work on it; my time working on Isis is largely building out features in support of Estatio [2]; so having JPA API support isn't a priority in that respect. We're more likely to prioritize building a next-gen viewer using AngularJS and the RO viewer (isis-viewer-restful). If anyone is keen to do the work though, then I'd be happy to spend a day with someone going through the JDO implementation, and identifying in detail the porting needed. Dan [2] https://github.com/estatio/estatio
Re: ISIS with JPA
Seems Jeroen's posted at the same time :-)) Alternatively, there's an easier path that would be to support JPA through DataNucleus. Regards, Oscar El 06/01/2014, a las 11:56, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Hi, Chittari. Currently Isis does not have an implementation for JPA, only for JDO. We've successfully (and really easily) migrated our domain from JPA to JDO. There was a recent thread detailing all this. You can find it here [1]. If anything's needed, feel free to ask. HTH, Oscar [1] http://markmail.org/thread/mdxfriy4soisntmt El 06/01/2014, a las 09:23, chittari.va...@wipro.com chittari.va...@wipro.com escribió: Hello, 1. We will like to use ISIS with JPA/Hibernate. Does ISIS Objectstore support JPA? We don't want JDO as our team most familiar with JPA. 2. How to override the JDO/DataNucleus configuration with JPA/Hibernate in ISIS? BR Ranganath Varma The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
Re: ISIS with JPA
... There's no guide as it would be needed to implement something equivalent to the isis-objectstore-jdo [1]. Perhaps Jeroen or Dan can give you an estimate about the effort it would require. As DataNucleus would also be the underlying object-store implementation, the only benefit would be to annotate your classes with JPA and perhaps use something like the Criteria API for querying on services. JDO/DataNucleus has equivalent APIs for all this functions. If instead of that, you consider to go through the tested path (JDO over DataNucleus) perhaps you will loose the ability to migrate in the future to other JPA supported platforms (despite it's really easy to simply search-and-replace equivalent annotations on domain entities) but you would be instantly productive over the current Isis stack. [1] https://github.com/apache/isis/tree/master/component/objectstore/jdo El 06/01/2014, a las 12:11, chittari.va...@wipro.com chittari.va...@wipro.com escribió: I think JPA through DataNucleus should also be OK. Is there any guide to override the config of JDO in ISIS? BR Ranganath Varma -Original Message- From: GESCONSULTOR - Óscar Bou [mailto:o@gesconsultor.com] Sent: Monday, January 06, 2014 4:29 PM To: users@isis.apache.org Subject: Re: ISIS with JPA Seems Jeroen's posted at the same time :-)) Alternatively, there's an easier path that would be to support JPA through DataNucleus. Regards, Oscar El 06/01/2014, a las 11:56, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Hi, Chittari. Currently Isis does not have an implementation for JPA, only for JDO. We've successfully (and really easily) migrated our domain from JPA to JDO. There was a recent thread detailing all this. You can find it here [1]. If anything's needed, feel free to ask. HTH, Oscar [1] http://markmail.org/thread/mdxfriy4soisntmt El 06/01/2014, a las 09:23, chittari.va...@wipro.com chittari.va...@wipro.com escribió: Hello, 1. We will like to use ISIS with JPA/Hibernate. Does ISIS Objectstore support JPA? We don't want JDO as our team most familiar with JPA. 2. How to override the JDO/DataNucleus configuration with JPA/Hibernate in ISIS? BR Ranganath Varma The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
Re: ISIS with JPA
There's also a good argument to your boss or team. JDO better supports NoSQL (such as MongoDB, Neo4J, HBases and others; see [1] and [2]). JPA was designed from the beginning to only support relational databases [3] and there are some bad assumptions on current API. That can become more and more important in the near future... HTH, Oscar [1] http://www.datanucleus.org/products/accessplatform_3_2/index.html [2] http://www.datanucleus.org/products/accessplatform_features.html [3] http://www.datanucleus.org/products/accessplatform_3_2/jpa/api.html El 06/01/2014, a las 12:11, chittari.va...@wipro.com chittari.va...@wipro.com escribió: I think JPA through DataNucleus should also be OK. Is there any guide to override the config of JDO in ISIS? BR Ranganath Varma -Original Message- From: GESCONSULTOR - Óscar Bou [mailto:o@gesconsultor.com] Sent: Monday, January 06, 2014 4:29 PM To: users@isis.apache.org Subject: Re: ISIS with JPA Seems Jeroen's posted at the same time :-)) Alternatively, there's an easier path that would be to support JPA through DataNucleus. Regards, Oscar El 06/01/2014, a las 11:56, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Hi, Chittari. Currently Isis does not have an implementation for JPA, only for JDO. We've successfully (and really easily) migrated our domain from JPA to JDO. There was a recent thread detailing all this. You can find it here [1]. If anything's needed, feel free to ask. HTH, Oscar [1] http://markmail.org/thread/mdxfriy4soisntmt El 06/01/2014, a las 09:23, chittari.va...@wipro.com chittari.va...@wipro.com escribió: Hello, 1. We will like to use ISIS with JPA/Hibernate. Does ISIS Objectstore support JPA? We don't want JDO as our team most familiar with JPA. 2. How to override the JDO/DataNucleus configuration with JPA/Hibernate in ISIS? BR Ranganath Varma The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
Re: IsisException: Object not yet known to Isis
Sure, Dan. Just to let you know, seems that there's a new DataNucleus release (3.2.9). I've touched my pom.xml files and was experimenting some errors while enhancing, a FieldNotFound exception (updateLock). Just after updating the datanucleus-core.version property to new version the compiler is working. HTH, Oscar El 23/12/2013, a las 08:40, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, glad that sorted it out. Yes, let's use that as the fix. Are you happy to raise the ticket and apply the patch? Cheers Dan On 21 December 2013 14:57, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Hi, Dan. Seems it was that annotation (dependentElement) and it was properly solved by changing this: void ensureRootObject(final PersistenceCapable pojo) { final ObjectAdapter adapter = getAdapterManager().getAdapterFor(pojo); if(adapter == null) { throw new IsisException(MessageFormat.format(Object not yet known to Isis: {0}, pojo)); } to this: void ensureRootObject(final PersistenceCapable pojo) { final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo); if(adapter == null) { throw new IsisException(MessageFormat.format(Object not yet known to Isis: {0}, pojo)); } Should it be updated on Isis? El 13/12/2013, a las 18:36, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Just to clarify to anyone seeing this code, I've noticed there was some legacy code on this Entity (the Programming Model's addTo removeFrom). As it's not currently needed (due to JDO's managed relationships) I've deleted it. Thanks again, Oscar El 13/12/2013, a las 18:23, Dan Haywood d...@haywood-associates.co.uk escribió: It could be the (... dependentElement = true) bit. I don't think we are using dependent objects in Estatio, which might be a reason we haven't seen this issue. You could also try temporarily removing that annotation. It might change your schema, so obviously only something to do running under HSQLDB. Cheers Dan On 13 December 2013 17:19, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Not being able to reproduce it now, as I need one system administrator that has just left until Monday. Those entities are part of a Scale (inside a Collection), and are lazy loaded due to that, I think. They have the following code: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) public class TimeScale extends AbstractScale { // {{ TimeScaleLevels (Collection) @Persistent(mappedBy = timeScale, dependentElement = true) private SortedSetPointInTime timeScaleLevels = new TreeSetPointInTime(); @MemberOrder(sequence = 1) public SortedSetPointInTime getTimeScaleLevels() { return this.timeScaleLevels; } public void setTimeScaleLevels(final SortedSetPointInTime timeScaleLevels) { this.timeScaleLevels = timeScaleLevels; } @MemberOrder(name = timeScaleLevels, sequence = 10) public TimeScale insertIntoTimeScaleLevels(final PointInTime timeScaleLevel) { this.addToTimeScaleLevels(timeScaleLevel); return this; } // Programming model. public void addToTimeScaleLevels(final PointInTime timeScaleLevel) { // check for no-op if ((timeScaleLevel == null) || this.getTimeScaleLevels().contains(timeScaleLevel)) { return; } // associate new this.getTimeScaleLevels().add(timeScaleLevel); // additional business logic this.onAddToTimeScaleLevels(timeScaleLevel); } // Action. @MemberOrder(name = timeScaleLevels, sequence = 20) public TimeScale deleteFromTimeScaleLevels(final PointInTime timeScaleLevel) { this.removeFromTimeScaleLevels(timeScaleLevel); return this; } // Programming model. public void removeFromTimeScaleLevels(final PointInTime timeScaleLevel) { // check for no-op if ((timeScaleLevel == null) || !this.getTimeScaleLevels().contains(timeScaleLevel)) { return; } // dissociate existing this.getTimeScaleLevels().remove(timeScaleLevel); // additional business logic this.onRemoveFromTimeScaleLevels(timeScaleLevel); } protected void onAddToTimeScaleLevels(final PointInTime timeScaleLevel) { } protected void onRemoveFromTimeScaleLevels(final PointInTime timeScaleLevel) { } // }} @SuppressWarnings(unchecked) @Override protected E extends AbstractScaleLevel SortedSetE internalGetElements() { return (SortedSetE) this.timeScaleLevels; } public PointInTime createLevel(@Named(Name) final String name, @Named(Description) @Optional final String description, @Named(Time Lapse Duration) final BigDecimal timelapseDuration, @Named(Time Lapse Unit) final StandardTimeUnit timelapseUnit) { return this.wrap(this.timeScales).createScaleLevel(this, name, description, StandardTimeUnit.HOURS.convert(timelapseDuration, timelapseUnit), timelapseUnit); } // {{ levelForPointInTime (action) @Hidden
Fast workflow on Isis
Hi to all. Dan, some days ago you commented the possibility to accelerate the workflow by integrating with JRebel. Just to mention, seems on the Ninja Framework they have achieved something similar as detailed in [1]. This functionality is introduced at [2], where it references an article in [3]. Perhaps it's a different approach to accelerate the Isis workflow. HTH, Oscar [1] http://www.ninjaframework.org/documentation/super_dev_mode.html [2] http://www.ninjaframework.org/documentation/getting_started.html [3] http://java.jiderhamn.se/2011/12/11/classloader-leaks-i-how-to-find-classloader-leaks-with-eclipse-memory-analyser-mat/
Re: IsisException: Object not yet known to Isis
Hi, Dan. Seems it was that annotation (dependentElement) and it was properly solved by changing this: void ensureRootObject(final PersistenceCapable pojo) { final ObjectAdapter adapter = getAdapterManager().getAdapterFor(pojo); if(adapter == null) { throw new IsisException(MessageFormat.format(Object not yet known to Isis: {0}, pojo)); } to this: void ensureRootObject(final PersistenceCapable pojo) { final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo); if(adapter == null) { throw new IsisException(MessageFormat.format(Object not yet known to Isis: {0}, pojo)); } Should it be updated on Isis? El 13/12/2013, a las 18:36, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Just to clarify to anyone seeing this code, I've noticed there was some legacy code on this Entity (the Programming Model's addTo removeFrom). As it's not currently needed (due to JDO's managed relationships) I've deleted it. Thanks again, Oscar El 13/12/2013, a las 18:23, Dan Haywood d...@haywood-associates.co.uk escribió: It could be the (... dependentElement = true) bit. I don't think we are using dependent objects in Estatio, which might be a reason we haven't seen this issue. You could also try temporarily removing that annotation. It might change your schema, so obviously only something to do running under HSQLDB. Cheers Dan On 13 December 2013 17:19, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Not being able to reproduce it now, as I need one system administrator that has just left until Monday. Those entities are part of a Scale (inside a Collection), and are lazy loaded due to that, I think. They have the following code: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) public class TimeScale extends AbstractScale { // {{ TimeScaleLevels (Collection) @Persistent(mappedBy = timeScale, dependentElement = true) private SortedSetPointInTime timeScaleLevels = new TreeSetPointInTime(); @MemberOrder(sequence = 1) public SortedSetPointInTime getTimeScaleLevels() { return this.timeScaleLevels; } public void setTimeScaleLevels(final SortedSetPointInTime timeScaleLevels) { this.timeScaleLevels = timeScaleLevels; } @MemberOrder(name = timeScaleLevels, sequence = 10) public TimeScale insertIntoTimeScaleLevels(final PointInTime timeScaleLevel) { this.addToTimeScaleLevels(timeScaleLevel); return this; } // Programming model. public void addToTimeScaleLevels(final PointInTime timeScaleLevel) { // check for no-op if ((timeScaleLevel == null) || this.getTimeScaleLevels().contains(timeScaleLevel)) { return; } // associate new this.getTimeScaleLevels().add(timeScaleLevel); // additional business logic this.onAddToTimeScaleLevels(timeScaleLevel); } // Action. @MemberOrder(name = timeScaleLevels, sequence = 20) public TimeScale deleteFromTimeScaleLevels(final PointInTime timeScaleLevel) { this.removeFromTimeScaleLevels(timeScaleLevel); return this; } // Programming model. public void removeFromTimeScaleLevels(final PointInTime timeScaleLevel) { // check for no-op if ((timeScaleLevel == null) || !this.getTimeScaleLevels().contains(timeScaleLevel)) { return; } // dissociate existing this.getTimeScaleLevels().remove(timeScaleLevel); // additional business logic this.onRemoveFromTimeScaleLevels(timeScaleLevel); } protected void onAddToTimeScaleLevels(final PointInTime timeScaleLevel) { } protected void onRemoveFromTimeScaleLevels(final PointInTime timeScaleLevel) { } // }} @SuppressWarnings(unchecked) @Override protected E extends AbstractScaleLevel SortedSetE internalGetElements() { return (SortedSetE) this.timeScaleLevels; } public PointInTime createLevel(@Named(Name) final String name, @Named(Description) @Optional final String description, @Named(Time Lapse Duration) final BigDecimal timelapseDuration, @Named(Time Lapse Unit) final StandardTimeUnit timelapseUnit) { return this.wrap(this.timeScales).createScaleLevel(this, name, description, StandardTimeUnit.HOURS.convert(timelapseDuration, timelapseUnit), timelapseUnit); } // {{ levelForPointInTime (action) @Hidden @MemberOrder(sequence = 1) public PointInTime levelForPointInTime(final BigDecimal pointInTime, final StandardTimeUnit pointInTimeUnits) { return (PointInTime) this.levelForValue(StandardTimeUnit.HOURS.convert(pointInTime, pointInTimeUnits)); } // }} // {{ injected: TimeScales private TimeScales timeScales; public void setTimeScales(final TimeScales timeScales) { this.timeScales = timeScales
Re: IsisException: Object not yet known to Isis
) at *Isis then attempts to synchronize its state with that of DataNucleus, and fails fast because it's being asked to locate an object that it has never seen before:* Caused by: java.lang.RuntimeException: org.apache.isis.core.commons.exceptions.IsisException: Object not yet known to Isis: [value=1.000, [name=1 hour, [tenantId=TENANT, [id=91FB2A32-BDC6-47A3-A67D-CE76FA4EF5EF, class name=com.xms.framework.architecture.domain.model.valuation.PointInTime at org.apache.isis.objectstore.jdo.datanucleus.persistence. FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:278) at org.apache.isis.objectstore.jdo.datanucleus.persistence. FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:287) *The actual exception is thrown by FrameworkSynchronizer#ensureRootObject* void ensureRootObject(final PersistenceCapable pojo) { final ObjectAdapter adapter = getAdapterManager().getAdapterFor(pojo); if(adapter == null) { throw new IsisException(MessageFormat.format(Object not yet known to Isis: {0}, pojo)); } *This is a fail fast because, I think, it ought not to happen... if the object was created using DomainObjectContainer#createTransientInstance(...), then the pojo's adapter would be in the AdapterManager.* Could you put a break point on the failing line (in ensureRootObject) and find out which object is not mapped, then see how that object is originally instantiated (eg put a break point in that object's constructor and look down the stacktrace). Dan On 13 December 2013 15:55, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Hi to all. While testing a part of our app, the following exception has been raised. It blocks the execution of any logic. Not sure about if it's a framework error or perhaps something regarding Isis Session management. Any help, please? Thanks, Oscar 16:40:05,021 [IsisTransaction http-8094-7 INFO ] abort transaction IsisTransaction@4ff9c1a1[state=MUST_ABORT,commands=0] 16:40:05,022 [JSONRPCControllerhttp-8094-7 ERROR] Exception executing consequence for rule event handler: Asset Dimension Impact restored. Send emails in com.xms.framework.monitoring.rules: java.lang.RuntimeException: org.apache.isis.core.commons.exceptions.IsisException: Object not yet known to Isis: [value=1.000, [name=1 hour, [tenantId=TENANT, [id=91FB2A32-BDC6-47A3-A67D-CE76FA4EF5EF, class name=com.xms.framework.architecture.domain.model.valuation.PointInTime com.xms.framework.api.exception.XMSRuntimeException: Exception executing consequence for rule event handler: Asset Dimension Impact restored. Send emails in com.xms.framework.monitoring.rules: java.lang.RuntimeException: org.apache.isis.core.commons.exceptions.IsisException: Object not yet known to Isis: [value=1.000, [name=1 hour, [tenantId=TENANT, [id=91FB2A32-BDC6-47A3-A67D-CE76FA4EF5EF, class name=com.xms.framework.architecture.domain.model.valuation.PointInTime at com.xms.framework.devstudio.service.AbstractDevStudioDomainService.executeAction(AbstractDevStudioDomainService.java:188) at com.xms.framework.impl.devstudio.service.XMSDomainCustomizeMethodsService.realTimeDashboards_notifyServiceUp(XMSDomainCustomizeMethodsService.java:5422) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.wavemaker.runtime.service.reflect.ReflectServiceType.invokeMethod(ReflectServiceType.java:115) at com.wavemaker.runtime.server.ServerUtils.invokeMethodWithEvents(ServerUtils.java:293) at com.wavemaker.runtime.server.ControllerBase.invokeMethod(ControllerBase.java:263) at com.wavemaker.runtime.server.JSONRPCController.executeRequest(JSONRPCController.java:109) at com.wavemaker.runtime.server.ControllerBase.handleRequestInternal(ControllerBase.java:135) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717
Re: IsisException: Object not yet known to Isis
BigDecimal currentTimeLapseDuration = this.getTimeLapseDuration(); // check for no-op if (currentTimeLapseDuration == null) { return; } // dissociate existing this.setTimeLapseDuration(null); // additional business logic this.onClearTimeLapseDuration(currentTimeLapseDuration); } protected void onModifyTimeLapseDuration(final BigDecimal oldTimeLapseDuration, final BigDecimal newTimeLapseDuration) { if ((newTimeLapseDuration != null) (this.getTimeLapseUnit() != null)) { this.setValue(StandardTimeUnit.HOURS.convert(this.timeLapseDuration, this.timeLapseUnit)); } else { this.setValue(null); } } protected void onClearTimeLapseDuration(final BigDecimal oldTimeLapseDuration) { this.setValue(null); } // }} // {{ TimeLapseUnit (property) private StandardTimeUnit timeLapseUnit; @Disabled @Column(allowsNull = false) @MemberOrder(sequence = 1) public StandardTimeUnit getTimeLapseUnit() { return this.timeLapseUnit; } public void setTimeLapseUnit(final StandardTimeUnit timeLapseUnit) { this.timeLapseUnit = timeLapseUnit; } // }} // {{ assignTimeLapse (action) @MemberOrder(sequence = 1) public void assignTimeLapse(@Named(Time Lapse - Duration) final BigDecimal duration, @Named(Time Lapse - Unit) final StandardTimeUnit standardTimeUnit) { this.setTimeLapseDuration(duration); this.setTimeLapseUnit(standardTimeUnit); this.setValue(StandardTimeUnit.HOURS.convert(duration, standardTimeUnit)); } // }} /* * (non-Javadoc) * * @see * com.xms.framework.risk.criteria.api.domain.ScaleLevel#isValueIncluded * (java.lang.Object) */ @Override @Programmatic public Boolean isValueIncluded(final BigDecimal value) { // The equals() method for BigDecimals fails when they don't have the // same scale. This is the proper way. See: // http://www.opentaps.org/docs/index.php/How_to_Use_Java_BigDecimal:_A_Tutorial if ((this.getValue() == null) || (this.getValue().compareTo(value) 0)) { return false; } else { final AbstractScaleLevel lowerLevel = this.getScale().lowerLevel(this); if (lowerLevel == null) { return true; } else if (lowerLevel.getValue().compareTo(value) 0) { return true; } else { return false; } } } @Override @NotPersisted @NotPersistent @Hidden public AbstractScale getScale() { return this.getTimeScale(); } @Override public void setScale(final AbstractScale scale) { this.timeScale = (TimeScale) scale; } public String disableValue() { return When you enter a Duration and a Time Unit the value will automatically be the equivalent number of Hours; } } HTH, Oscar El 13/12/2013, a las 17:58, Dan Haywood d...@haywood-associates.co.uk escribió: It is, perhaps, possible that the object not yet mapped is already persisted... perhaps it's being loaded lazily earlier on somehow, and isn't being picked up by the synchronizer. Can you put a break point at the ensureRootLogging(...) when it throws the exception, and copy the full stack trace out? Also, there may be a quick fix (though it's a bit hacky; it'd be nice to understand why this is breaking). Even so, to apply that possible fix/hack, in ensureRootLObject(...), change the call to getAdapterFor(...) to instead call adapterFor(...); this latter method will create the adapter if it's not there. Dan On 13 December 2013 16:37, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Thanks a lot, Dan. This object is: [value=1.000, [name=1 hour, [tenantId=TENANT, [id=91FB2A32-BDC6-47A3-A67D-CE76FA4EF5EF, class name=com.xms.framework.architecture.domain.model.valuation.PointInTime That PointInTime was initially created through a Fixture - on a past execution -, and currently loaded from the database through a repository call. The code for the repository's method, findByPropMultiTenant is the next one: @Programmatic public S extends AbstractXMSDomainObject ListS findByPropMultiTenant(final String tenantId, final ClassS clazz, final String whereClause, final Integer firstResult, final Integer maxResults, final String orderClause) { return IsisContext.getTransactionManager().executeWithinTransaction(new TransactionalClosureWithReturnAbstractListS() { @Override public ListS execute() { return AbstractXMSDomainObjectRepositoryAndFactory.this.doFindByPropMultiTenant(tenantId, clazz, whereClause, firstResult, maxResults, orderClause); } @Override public void onFailure
Re: IsisException: Object not yet known to Isis
Just to clarify to anyone seeing this code, I've noticed there was some legacy code on this Entity (the Programming Model's addTo removeFrom). As it's not currently needed (due to JDO's managed relationships) I've deleted it. Thanks again, Oscar El 13/12/2013, a las 18:23, Dan Haywood d...@haywood-associates.co.uk escribió: It could be the (... dependentElement = true) bit. I don't think we are using dependent objects in Estatio, which might be a reason we haven't seen this issue. You could also try temporarily removing that annotation. It might change your schema, so obviously only something to do running under HSQLDB. Cheers Dan On 13 December 2013 17:19, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Not being able to reproduce it now, as I need one system administrator that has just left until Monday. Those entities are part of a Scale (inside a Collection), and are lazy loaded due to that, I think. They have the following code: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) public class TimeScale extends AbstractScale { // {{ TimeScaleLevels (Collection) @Persistent(mappedBy = timeScale, dependentElement = true) private SortedSetPointInTime timeScaleLevels = new TreeSetPointInTime(); @MemberOrder(sequence = 1) public SortedSetPointInTime getTimeScaleLevels() { return this.timeScaleLevels; } public void setTimeScaleLevels(final SortedSetPointInTime timeScaleLevels) { this.timeScaleLevels = timeScaleLevels; } @MemberOrder(name = timeScaleLevels, sequence = 10) public TimeScale insertIntoTimeScaleLevels(final PointInTime timeScaleLevel) { this.addToTimeScaleLevels(timeScaleLevel); return this; } // Programming model. public void addToTimeScaleLevels(final PointInTime timeScaleLevel) { // check for no-op if ((timeScaleLevel == null) || this.getTimeScaleLevels().contains(timeScaleLevel)) { return; } // associate new this.getTimeScaleLevels().add(timeScaleLevel); // additional business logic this.onAddToTimeScaleLevels(timeScaleLevel); } // Action. @MemberOrder(name = timeScaleLevels, sequence = 20) public TimeScale deleteFromTimeScaleLevels(final PointInTime timeScaleLevel) { this.removeFromTimeScaleLevels(timeScaleLevel); return this; } // Programming model. public void removeFromTimeScaleLevels(final PointInTime timeScaleLevel) { // check for no-op if ((timeScaleLevel == null) || !this.getTimeScaleLevels().contains(timeScaleLevel)) { return; } // dissociate existing this.getTimeScaleLevels().remove(timeScaleLevel); // additional business logic this.onRemoveFromTimeScaleLevels(timeScaleLevel); } protected void onAddToTimeScaleLevels(final PointInTime timeScaleLevel) { } protected void onRemoveFromTimeScaleLevels(final PointInTime timeScaleLevel) { } // }} @SuppressWarnings(unchecked) @Override protected E extends AbstractScaleLevel SortedSetE internalGetElements() { return (SortedSetE) this.timeScaleLevels; } public PointInTime createLevel(@Named(Name) final String name, @Named(Description) @Optional final String description, @Named(Time Lapse Duration) final BigDecimal timelapseDuration, @Named(Time Lapse Unit) final StandardTimeUnit timelapseUnit) { return this.wrap(this.timeScales).createScaleLevel(this, name, description, StandardTimeUnit.HOURS.convert(timelapseDuration, timelapseUnit), timelapseUnit); } // {{ levelForPointInTime (action) @Hidden @MemberOrder(sequence = 1) public PointInTime levelForPointInTime(final BigDecimal pointInTime, final StandardTimeUnit pointInTimeUnits) { return (PointInTime) this.levelForValue(StandardTimeUnit.HOURS.convert(pointInTime, pointInTimeUnits)); } // }} // {{ injected: TimeScales private TimeScales timeScales; public void setTimeScales(final TimeScales timeScales) { this.timeScales = timeScales; } // }} --- @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.NEW_TABLE) public class PointInTime extends AbstractScaleLevelBin { // {{ TimeScale (property) private TimeScale timeScale; @Column(allowsNull = false) @MemberOrder(sequence = 1) public TimeScale getTimeScale() { return this.timeScale; } public void setTimeScale(final TimeScale timeScale) { this.timeScale = timeScale; } // }} // {{ TimeLapseDuration (property) private BigDecimal timeLapseDuration; @Disabled @Column(allowsNull = false) @MemberOrder(sequence = 1
Re: Few questions
Hi, Satyendra. We migrated our Domain from JPA to JDO in order to work with Isis. It was really easy and the advantages to use Isis for implementing the business rules overcomes the invested effort (less than 2 days) . Basically, a find-and-replace work that can nearly be done automatically. For each JPA annotation there's an equivalent JDO annotation. In fact, there are JDO options more flexible than the JPA counterparts (like the possibility to mix different @Inheritance options on the same class hierarchy [1], comparing with JPA's @Inheritance annotation [2]). As you explicitly mentioned it, here are the JDO documentation links to the corresponding annotations for one-to-one [3], one-to-many [4] and many-to-many [5] relationships between Domain Entities. If you want to avoid learning about them, I've just uploaded a new version of the Isis Templates for Eclipse that contains a set of templates, all them starting with isjd (from Is-is JD-O templates), that allows to automatically add a new one-to-one, one-to-many, or many-to-many field. Exactly, the following ones are provided: KEY : DESCRIPTION isjdp : JDO Property (simple 1:1 bidir - parent) isjdp-11p : JDO Property (1:1 child) isjdc-1n-b-fk : JDO Collection (1:n bidir, foreign key) isjdc-1n-b-jt : JDO Collection (1:n bidir, join table) isjdc-1n-u-fk : JDO Collection (1:n unidir, foreign key) isjdc-1n-u-jt : JDO Collection (1:n unidir, join table) isjdc-mn-ub-c : JDO Collection (m:n bidir - child) isjdc-mn-ub-p : JDO Collection (m:n unidir bidir - parent) For simple properties, we need to explicitly indicate if its nullable. For bidirectional one-to-one properties, one of them is the parent and the other the child (the opposite side, referenced through a field on the parent entity - i.e., mappedBy). For collections, I've just use Sets (not Lists) as they allow to directly implement Managed Relationships [6] (for just inserting on one side of the collection and automatically update the other side of the relationships when you execute getContainer().flush() ). For downloading and installing instructions, go to [7]. After that, you can invoke them in the context of a Java class whille defining the Domain Entity. Please, if you experiment any problems regarding DataNucleus JDO, don't hesitate to post it here and it will be solved ASAP. HTH, Oscar [1] http://www.datanucleus.org/products/datanucleus/jdo/orm/inheritance.html [2] http://stackoverflow.com/questions/10003155/mixing-jpa-inheritance-strategies-inheritancetype-joined-with-inheritancetype [3] http://www.datanucleus.org/products/datanucleus/jdo/orm/one_to_one.html [4] http://www.datanucleus.org/products/datanucleus/jdo/orm/one_to_many.html [5] http://www.datanucleus.org/products/datanucleus/jdo/orm/many_to_many.html [6] http://www.datanucleus.org/products/datanucleus/jdo/orm/relationships.html [7] http://isis.apache.org/getting-started/editor-templates.html El 12/12/2013, a las 20:43, Jeroen van der Wal jer...@stromboli.it escribió: Hi Satyendra, welcome to this list. I don't totally agree on Dan's answer on your first question, should one learn JDO in able to use Isis. Annotating a class with @PersistenceCapable and annotation fields of types that are not persisted by default (like LocalDate) [1] is enough to get your application running. You need to dive into JDO when you want to tap into the power of your database for faster repository queries but for prototyping you can easily use Java code to do the work. It is at least the way I gradually moved into JDO. Datanucleus, the objectstore the we (and Google App Engine) use has an interesting JDO vs JPA faq [2], JDO itself goes even a step further by stating that JPA is subset of JDO [3][4] so moving to JPA would IMHO only limit Isis's capabilities. But instead of focusing on the differences between the two I should point out that the API is quite similar and a programmer with JPA skills should have no difficulty with JDO. Cheers, Jeroen [1] http://www.datanucleus.org/products/datanucleus/jdo/types.html [2] http://www.datanucleus.org/products/accessplatform_2_1/jdo_jpa_faq.html [3] http://db.apache.org/jdo/jdo_v_jpa.html [4] http://db.apache.org/jdo/jdo_v_jpa_orm.html On Thu, Dec 12, 2013 at 7:58 PM, Dan Haywood d...@haywood-associates.co.ukwrote: On 12 December 2013 18:34, Satyendra Singh ssi...@apollo-advisors.com wrote: I have few questions on ISIS usage. 1) I am assuming one has to learn JDO and its DataNucleus implementation to be able to use it, right? Practically speaking, yes. In theory, Isis does support multiple object store implementations. To date, the only ones released as the JDO/DataNucleus objectstore and - for prototyping onlt - the in-memory objectstore. I would recommend using JDO OS throughout, even for prototyping, though. There are subtle differences
Re: ISIS-486: modal dialogs for action prompts
Good done. We also use modal dialogs on our custom viewer to avoid context switching. The same dialog redirects to a Domain Object if that's the result of the action invocation, or currently shows a Collection in a grid on the same dialog if that's the result of the action. The user can then navigate to any of the objects in the collection. El 02/12/2013, a las 17:54, Dan Haywood d...@haywood-associates.co.uk escribió: Hi folks, just an fyi that I've committed and pushed ISIS-486 [1], to render the Wicket viewer's action prompts in modal dialogs. This should make for a better overall user experience. To use, you'll need to build from source, as per [2]. In case there are issues, the old behaviour (action prompts on their own page) can be enabled by adding the following property: isis.viewer.wicket.disableModalDialogs=true into WEB-INF/viewer_wicket.properties (or isis.properties if you prefer). I'll probably remove this original behaviour before pushing out a final release, though. Cheers Dan [1] https://issues.apache.org/jira/browse/ISIS-486 [2] http://isis.apache.org/contributors/building-isis.html
Re: If using trunk, must register entities eagerly (ISIS-611)
Just to clarify, for people migrating to the latest snapshot after this commit, the only (optional) thing to do is remove the RegisterEntities from isis.properties as it's no longer needed, isn't it? El 27/11/2013, a las 09:31, Dan Haywood d...@haywood-associates.co.uk escribió: Folks, for anyone working off the latest in source, I've just implemented a change in ISIS-611 making it mandatory for entities to be registered with JDO eagerly. If they are not, then the app won't boot (ie fails early). Details are at: http://isis.apache.org/components/objectstores/jdo/eagerly-registering-entities.html (This is the problem that was breaking Estatio for Jeroen, on the back of a change I made in ISIS-597. I broke the ordering, basically. Humble pie has been duly eaten). Thx Dan
Re: error running isis Quickstart
Oh That would be Programming in Heaven :-))) El 23/11/2013, a las 23:26, Dan Haywood d...@haywood-associates.co.uk escribió: Interesting, I hadn't noticed that there's a runtime enhancement option. One possibility might be to write a JRebel plugin [2] which could also reload the Isis metamodel. That'd make for a really nice workflow. [2] http://zeroturnaround.com/software/jrebel/learn/jrebel-plugins/ Oops, too fast.. [1] http://www.datanucleus.org/products/accessplatform/jdo/enhancer.html#runtime On Fri, Nov 22, 2013 at 7:35 PM, Jeroen van der Wal jer...@stromboli.it wrote: Hi Oscar, I can confirm that the DN enhancer is a bottleneck in our development workflow too. Perhaps it's worth investing some time to programmatically enhance the classes at runtime [1] when called from org.apache.isis.WebServer which is used when launching the app from Eclipse. Or maybe trigger runtime enhancement when the exception appears en restart afterwards? Very nice to hear that you're committed though :-) -Jeroen [1] On Fri, Nov 22, 2013 at 6:46 PM, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Our main workflow stopper while testing is also that the DatNucleus Enhancer is sometimes unreliable... It's really difficult to know what's the root cause, but seems easy to enter on a case when the classes have not been enhanced and the cannot instantiate an abstract class, or similar to the following one occurs: 11:29:20,527 [Datastoremain ERROR] Una excepcion estaba tirada durante la addicion/validacion de algunas class(es) : la columna de tipo LOB o ARRAY no se puede usar en esta operación java.sql.SQLSyntaxErrorException: la columna de tipo LOB o ARRAY no se puede usar en esta operación at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) In all cases, the solution is to disable (if enabled) the automatic DataNucleus enhancement on all -domain modules, and run it manually (by order of dependencies, if there is more than one -domain module). Perhaps we could ask for some enhancement to the enhancer for instance, as we as a project are quite committed to DataNucleus by now ... El 15/11/2013, a las 16:27, Satyendra Singh ssi...@apollo-advisors.com escribió: Thanks Dan. mvn clean install followed by mvn jetty:run from the command line , produces same error. What is different about mvn antrun:run that this works? I am going to enhance the classes as per Jeroen's email and hoping it will work. Thanks for responding. -Original Message- From: Dan Haywood [mailto:d...@haywood-associates.co.uk] Sent: Thursday, November 14, 2013 6:42 PM To: users Subject: Re: error running isis Quickstart Hi Saty, welcome to the Isis mailing list. The errors you are getting when running mvn jetty:run in Eclipse look to me like mvn/Eclipse isn't downloading third-party dependencies (shiro and/or JBoss). Can I ask, what happens if you run mvn clean install followed by mvn jetty:run from the command line? ~~~ Per the strange LOB error, the fix is as Jeroen says... you need to enhance the classes. Ah, we know that error well! When running under mvn, there's a maven plugin that does this immediately after the compile. When running under Eclipse, though, you need to set up DataNucleus' plugin for Eclipse. HTH Dan On 14 November 2013 21:02, Satyendra Singh ssi...@apollo-advisors.com wrote: I tried the instructions at http://isis.apache.org/getting-started/quickstart-archetype.html From a command line mvn antrun:run works! But within eclipse using mvn jetty:run does not with below error. 013-11-14 15:53:53.861:INFO::jetty-6.1.25 2013-11-14 15:53:53.988:WARN::Could not instantiate listener org.apache.shiro.web.env.EnvironmentLoaderListener java.lang.ClassNotFoundException: org.apache.shiro.web.env.EnvironmentLoaderListener at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363) at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101) at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630) at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368
Re: error running isis Quickstart
Our main workflow stopper while testing is also that the DatNucleus Enhancer is sometimes unreliable... It's really difficult to know what's the root cause, but seems easy to enter on a case when the classes have not been enhanced and the cannot instantiate an abstract class, or similar to the following one occurs: 11:29:20,527 [Datastoremain ERROR] Una excepcion estaba tirada durante la addicion/validacion de algunas class(es) : la columna de tipo LOB o ARRAY no se puede usar en esta operación java.sql.SQLSyntaxErrorException: la columna de tipo LOB o ARRAY no se puede usar en esta operación at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) In all cases, the solution is to disable (if enabled) the automatic DataNucleus enhancement on all -domain modules, and run it manually (by order of dependencies, if there is more than one -domain module). Perhaps we could ask for some enhancement to the enhancer for instance, as we as a project are quite committed to DataNucleus by now ... El 15/11/2013, a las 16:27, Satyendra Singh ssi...@apollo-advisors.com escribió: Thanks Dan. mvn clean install followed by mvn jetty:run from the command line , produces same error. What is different about mvn antrun:run that this works? I am going to enhance the classes as per Jeroen's email and hoping it will work. Thanks for responding. -Original Message- From: Dan Haywood [mailto:d...@haywood-associates.co.uk] Sent: Thursday, November 14, 2013 6:42 PM To: users Subject: Re: error running isis Quickstart Hi Saty, welcome to the Isis mailing list. The errors you are getting when running mvn jetty:run in Eclipse look to me like mvn/Eclipse isn't downloading third-party dependencies (shiro and/or JBoss). Can I ask, what happens if you run mvn clean install followed by mvn jetty:run from the command line? ~~~ Per the strange LOB error, the fix is as Jeroen says... you need to enhance the classes. Ah, we know that error well! When running under mvn, there's a maven plugin that does this immediately after the compile. When running under Eclipse, though, you need to set up DataNucleus' plugin for Eclipse. HTH Dan On 14 November 2013 21:02, Satyendra Singh ssi...@apollo-advisors.comwrote: I tried the instructions at http://isis.apache.org/getting-started/quickstart-archetype.html From a command line mvn antrun:run works! But within eclipse using mvn jetty:run does not with below error. 013-11-14 15:53:53.861:INFO::jetty-6.1.25 2013-11-14 15:53:53.988:WARN::Could not instantiate listener org.apache.shiro.web.env.EnvironmentLoaderListener java.lang.ClassNotFoundException: org.apache.shiro.web.env.EnvironmentLoaderListener at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363) at org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101) at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630) at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initWebXmlElement(AbstractConfiguration.java:190) at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initialize(AbstractConfiguration.java:133) at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:113) at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180) at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:96) at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:149) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1269) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489) at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115) at
Services still not injected when entering @PostConstruct methods on a Service
Hi to all. I have an Isis service that needs to initialize a server upon creation (it's a Drools session, but it would be the same with an email server, for instance). For initializing that server, I need to pass it references to other Isis services (in this case Drools globals). If, as per [1], I try like this: @PostConstruct public void init(final Map?, ? props) { server.setGlobal(eventOccurrences, this.eventOccurrences); } // {{ injected: EventOccurrences private EventOccurrences eventOccurrences; public final void injectEventOccurrences(final EventOccurrences eventOccurrences) { this.eventOccurrences = eventOccurrences; } // }} The problem is that when the execution arrives to: server.setGlobal(eventOccurrences, this.eventOccurrences); this.eventOccurrences is still null... So it has not yet been injected (or instantiated). I must ensure that the server starts to run from the beginning of the Isis application execution. There's a note on [1] footer, but I thought this is not the case, as my only expectation is that services are injected when calling @PostConstruct methods. Perhaps I'm missing something basic or the previous expectation is precisely the one explicited by the footer note ... If that's the case, is there a better way to solve it? Thanks, Oscar [1] http://isis.apache.org/core/services/initializing-services.html
Re: Services still not injected when entering @PostConstruct methods on a Service
Just to point it out, as per [1] and [2], @PostConstruct should only be called after all dependencies have been injected. Thanks again, Oscar [1] http://docs.oracle.com/javaee/5/api/javax/annotation/PostConstruct.html [2] http://wiki.eclipse.org/Eclipse4/RCP/Dependency_Injection#.40PostConstruct.2C_.40PreDestroy_.28javax.annotation.29 El 17/11/2013, a las 17:15, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Hi to all. I have an Isis service that needs to initialize a server upon creation (it's a Drools session, but it would be the same with an email server, for instance). For initializing that server, I need to pass it references to other Isis services (in this case Drools globals). If, as per [1], I try like this: @PostConstruct public void init(final Map?, ? props) { server.setGlobal(eventOccurrences, this.eventOccurrences); } // {{ injected: EventOccurrences private EventOccurrences eventOccurrences; public final void injectEventOccurrences(final EventOccurrences eventOccurrences) { this.eventOccurrences = eventOccurrences; } // }} The problem is that when the execution arrives to: server.setGlobal(eventOccurrences, this.eventOccurrences); this.eventOccurrences is still null... So it has not yet been injected (or instantiated). I must ensure that the server starts to run from the beginning of the Isis application execution. There's a note on [1] footer, but I thought this is not the case, as my only expectation is that services are injected when calling @PostConstruct methods. Perhaps I'm missing something basic or the previous expectation is precisely the one explicited by the footer note ... If that's the case, is there a better way to solve it? Thanks, Oscar [1] http://isis.apache.org/core/services/initializing-services.html
Re: Views and view models
Hi James, In our case, the reporting capabilities were of high importance to the end-users, so we chose to integrate a full Self-Service BI platform as part of the whole solution, instead of developing a custom integration with Jasper, custom charts, etc. The solution is SpagoBI. Find more information about features at [1], a running demo on [2], and information about licensing (Mozilla Public License v.2.0) on [3]. Really powerful and easy to use for end-customers. It was not easy to setup and run (at least in the first version 4 release) but once done, it works ok. Some configuration instructions and config files are missing, but we can help if needed. The domain is starting to being managed by Isis in some Business Contexts, and the reporting works directly against the database structure. The SpagoBI viewer is simply integrated with iframes, and it also supports CAS for Single Sign-On. Another option if you don't want a full BI platform, but instead analytical dashboards that allow you to drill-down on charts, etc. is the newly released JBoss Dashboard Builder, with Apache License. It's being developed as part of the JBPM project, but is fully supported to be deployed stand-alone, just for data analytics. We've also adopted it for complementing SpagoBI capabilities regarding management dashboards. Find source code at [4], including setup instructions, and you can access a recorded webminar dated last 26th October, on [5]. HTH, Oscar [1] http://spagobi.com [2] http://spagobi.eng.it/SpagoBI/servlet/AdapterHTTP?PAGE=LoginPageNEW_SESSION=TRUE [3] http://www.spagoworld.org/xwiki/bin/view/SpagoBI/OpenSource [4] https://github.com/droolsjbpm/dashboard-builder [5] https://engage.redhat.com/forms/20131024_BAM-in-BPM-reg El 12/11/2013, a las 10:34, David Tildesley davo...@yahoo.co.nz escribió: Hi Jeroen, Out of curiosity, what was the driver for using a database view instead of calling the behaviour on the domain layer to get the information for the view model? Performance? David. On Tuesday, 12 November 2013 1:09 AM, Jeroen van der Wal jer...@stromboli.it wrote: To answer questions 1 and 2: the Estatio codebase has two examples of a viewmodel using a database view [1]. Haven't worked with Jasper Reports myself, perhaps others have? [1] https://github.com/estatio/estatio/tree/master/dom/src/main/java/org/estatio/dom/invoice/viewmodel On Sun, Nov 10, 2013 at 11:47 PM, james agada okwuiag...@gmail.com wrote: I want to use view models. The documentation is a bit scanty and the todo view model and how it is used is difficult for me to comprehend. 1. Can I define views at database level and map it to a view model? If so, a small example will do. 2. Is there a better documented example of using view models for instance for reports. 3. Is there a way to integrate something like jasper report to isis?
Re: [DISCUSSION] should Isis drop JDK 1.6 support?
+1 El 13/10/2013, a las 20:13, Michael Xiao michael.b.x...@gmail.com escribió: +1 On 11 October 2013 23:59, Dan Haywood d...@haywood-associates.co.uk wrote: Several reasons: 1. Martin Grigorov (Wicket committer) and Michael Haitz (similar Wicket expert) are working on ISIS-537 [1] to restyle Wicket using Bootstrap3. One of their key dependencies is currently only available under JDK 1.7. 2. Wicket 7.0 will mandate JDK 1.7, and, obviously Isis' Wicket viewer should keep up with the latest version of Wicket. 3. its 2013 already. Any votes +1 or -1? Thx Dan [1] https://github.com/l0rdn1kk0n/isis/commits/ISIS-537
Re: infinite loop being hit during isis startup
Same happened to a mate upgrading to the latest snapshot. A default value as suggested by Jeremy would be ok. Jeremy, did you see the mail at [1] ? It's intent was to solve your idea of a generic Spec Transformer for Isis entities. There I copied the code of a generic class. I'm testing an improved version and plan to commit it next week (in fact, 1 abstract class with 2 specializations; one allowing null entities, and one throwing an exception if the referenced object is not found - as normally is a transcription problem). If you want to previously access it, don't hesitate to ask and I can attach current version to a JIRA ticket. HTH, Oscar [1] http://markmail.org/search/isis-users+list:org.apache.incubator.isis-users#query:isis-users%20list%3Aorg.apache.incubator.isis-users%20from%3A%22GESCONSULTOR%20-%20%C3%93scar%20Bou%22+page:9+mid:tibcgc45fii566w3+state:results El 12/09/2013, a las 19:13, Jeremy Gurr jere...@infusionsoft.com escribió: Getting this in a stack trace: at org.apache.isis.core.commons.config.IsisConfigurationBuilderResourceStreams.addDefaultConfigurationResources(IsisConfigurationBuilderResourceStreams.java:112) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.createConfigBuilder(IsisWicketApplication.java:293) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.createConfigBuilder(IsisWicketApplication.java:272) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.determineDeploymentTypeIfRequired(IsisWicketApplication.java:227) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.getConfigurationType(IsisWicketApplication.java:247) at org.apache.wicket.Application.usesDevelopmentConfig(Application.java:1692) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.determineDeploymentType(IsisWicketApplication.java:265) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.determineDeploymentTypeIfRequired(IsisWicketApplication.java:230) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.getConfigurationType(IsisWicketApplication.java:247) at org.apache.wicket.Application.usesDevelopmentConfig(Application.java:1692) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.determineDeploymentType(IsisWicketApplication.java:265) … which repeats until the stack is overflowed. If I put: isis.deploymentType=PROTOTYPE in the isis.properties, the problem goes away. It would be nice if this property would default to something, or at least give an error message explaining the requirement that this property be set. -- Jeremy
Re: [DISCUSSION] Using a DSL as a pure object model (was: Mothballing SQL ObjectStore, auto-inferring JDO annotations from Isis conventions)
Horses for courses. (British Australian) something that you say which means that it is important to choose suitable people for particular activities because everyone has different skills Ah well, horses for courses. Just because a plumber can mend your washing machine, it doesn't follow that he can mend your car as well. I'm learning so much here! ... :-)) El 12/09/2013, a las 13:37, Dan Haywood d...@haywood-associates.co.uk escribió: On 12 September 2013 09:37, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: I think that we are considering 3 different use cases: 1. MIGRATE AN EXISTING JDO/JPA PROJECT TO ISIS I think it's a must. So the direct use of JDO or JPA annotations to derive from there all relevant Isis Facets shall be fully supported. 2. START A NEW ISIS APP USING EXISTING JDO/JPA KNOWLEDGE I think it's a must. If the previous one is implemented, is fully supported. 3. CREATE AN ISIS APP WITH JUST ISIS ANNOTATIONS FOR BEHAVIORAL FACETS Naming tables, fields, etc. should be a responsibility of the ORM, so no Isis annotations needed. But Managed Relationships (if implemented as having the addTo/removeFrom Isis templates), or Required Columns change behavior, and, as must have a corresponding Facet for propagating to the viewers at least, my view is that an Isis annotation would be needed (so the current one shouldn't be deprecated). This is a useful categorization; thanks. If Isis annotations are present, they could be used also for updating the DN's metadata (the Kevin's viewpoint). Here I don't find anything in conflict with points 1 and 2, so they're not mutually exclusive. And if there are Isis and JDO/JPA annotations present (in the future can also be Bean Validation annotations and others) the only thing to consider is to detect if they are in conflict (you implemented that for the @Column annotation on previous commits). Regarding the Managed Relationships cited on previous emails, it should be a special case, as the collections would be updated at the very moment of inserting an item, the expected behavior is not exactly the same as the DN one, which ONLY updates it when doing getContainer.flush(). A new Facet would be required, and it does not correspond exactly with the DN behavior, so perhaps it should be implemented on the CGLIB module? So, basically, I advocate just for having a corresponding Isis annotation for each Facet. Other ORM responsibilities not relevant for the Isis meta-model should not be replicated by Isis, IMHO. Yeah, on balance I agree with this. I guess it's horses for courses Regarding the DSL, I like the idea of having a simple one. My expertise is near-0, but for clarifying the use-cases where we could use it, I should ask some questions: - Could it be used for scripting? For example, we want to extend or customize at runtime an Isis Domain model, or perhaps expose some Isis entities and change the behavior of some actions. Could it be done? Or it should be used just for writing and maintaining the domain in a whole? No, that wasn't an intention. Rather, just a way to be able to express domain entities at an appropriate abstraction level. (For runtime customization, I think that the entity should delegate out to a service; the service implementation might provide some sort of dynamic/script behaviour, eg the Drools engine). - I nearly always read about the advantages of using Groovy for writing DSLs on Java-based applications. As an example [4], but google'ing about groovy + dsl brings a lot of links. What advantages could we have in our applications by using the XText vs the Groovy approach? XText DSLs are external DSLs, so can be structured however we want, whereas Groovy DSLs are internal DSLs - ultimately they are Groovy programs. Obviously Groovy is very flexible, but that is a limiting factor. Also, although Groovy does now have a statically typed option, I don't know whether an internal DSL in Groovy would play well with that. In contrast, XText DSLs are fully statically typed. There is also the IDE support that XText provides... code completion, refactor, outlines views, compile markers, quick fixes. I suspect that the Groovy IDE for Eclipse would provide some limited support for this, but it clearly couldn't ever be as sophisticated as providing a quick fix hint, for example. Dan Until now, the only one we've used is for is the one used on JBoss Drools for writing Business Rules. I don't know nearly anything about the internals. Just posting here some links in the hope that can be relevant to expert's eyes: [2] Article explaining its purpose. [3] A simple project example. [4] A link to the DSL compiler source code. Thanks, Oscar [1] http://docs.codehaus.org/display/GROOVY/Writing+Domain-Specific+Languages [2] http://java.dzone.com/articles/externalizing
Re: [DISCUSSION] Mothballing SQL ObjectStore, auto-inferring JDO annotations from Isis conventions
I must admit that was one of our expectations when we firstly approximated Isis, perhaps because we were following the email list or saw the SQL Objectstore, etc. In fact, seems that recently we have taken the opposite path (by requiring nearly all Entity properties to be annotated with @Column(allowsTrue=true|false), instead of improving the JDO Object Store usage of the Isis meta-model. It would also have another advantage: it would be the way to also support JPA implementations (or lessen the effort required). But we cannot expected to map/solve all ORM requirements on the Isis metamodel, so the end situation will be some inferred, some explicited for sure. I think that perhaps we must clarify Apache Isis responsibilities, and concentrate on them. So let me do a quick-and-dirty Envisionning exercise (it's Sunday...). VISION STATEMENT: Apache Isis intend to provide programmers with the best framework for implementing Domain-Driven Applications that interact with its environment without compromising business logic. For that, I would say (for debating) the following (quick) responsibilities: - The core responsibilities are: 1. to ease on Domain implementation (Entities, their relationships, and behavior / business rules / actions). 2. to ease on Domain interaction with the environment (establishing ways to securely share that Domain Rules with the environment - applications or humans -). 3. to ease on Business Logic protection against business-logic thieves such as UIs and ORMs (by having all contextual info needed for the domain, and also for the actors interacting with the Domain). From such a perspective: a. From the ORM framework, we only need on the meta-model those annotations that affects the behavior of the Domain (read-only / transient, required, etc.) or the way the actors interact with it (memo/blob fields, etc.). But we don't need any information regarding how the ORM framework will store the domain, for example (any related to inheritance mappings, table or field names, etc.). b. From Bean Validation frameworks, in theory we need all... It's all related to Domain's behavior. But we can simply consider it as another idiom to express Domain logic, and, as such, we should be able to use it internally on the Domain, but also to communicate it to external actors such as the UI and ORMs (nothing needed for the latter; it's currently implemented on Hibernate and seems that previous specification also on DataNucleus). c. For viewers (including webapp, RESTful Objects, etc. but also the ORM framework - it's just another adapter- detailed after), we need to give access to the domain structure (mainly Entities, their relationships, and behavior / business rules / actions) and contextual information about the status of the domain (and, perhaps, about the actors interacting with them, acting as a Glue or as a coordinator between all those interacting with them - like using information about the status of the ObjectStore to show in the User Interface, the Security Service, etc.). So perhaps a. would be my response to auto-inferring annotations right now... Those affecting the Domain's behavior yes, those about internals no... Please, tell me if any other framework is as close to Alistair Cockburn's Ports and Adapters or Hexagonal Architecture as Apache Isis is [1]. It's interesting to read the Nature of the Solution section from the Apache Isis perspective. -- Citation -- THE PROBLEM Both the user-side and the server-side problems actually are caused by the same error in design and programming — the entanglement between the business logic and the interaction with external entities. The asymmetry to exploit is not that between ‘’left’’ and ‘’right’’ sides of the application but between ‘’inside’’ and ‘’outside’’ of the application. The rule to obey is that code pertaining to the ‘’inside’’ part should not leak into the ‘’outside’’ part. -- Me: And we have the means to communicate between inside and outside through the RESTful Objects specification. CONSIDERATIONS ABOUT THE USER INTERFACE For each external device there is an ‘’adapter’’ that converts the API definition to the signals needed by that device and vice versa. A graphical user interface or GUI is an example of an adapter that maps the movements of a person to the API of the port. Other adapters that fit the same port are automated test harnesses such as FIT or Fitnesse, batch drivers, and any code needed for communication between applications across the enterprise or net. CONSIDERATIONS ABOUT THE DATABASE On another side of the application, the application communicates with an external entity to get data. The protocol is typically a database protocol. From the application’s perspective, if the database is moved from a SQL database to a flat file or any other kind of database, the conversation across the API should not change. Additional adapters for the same
Re: Isis session and transaction management on a custom viewer
Thanks a lot, David. Yes, we have other platforms integrated with CAS, so the session could be kept alive longer than the Isis web session, so that could potentially occur. If I've understood well, you have enabled the Shiro Native Session as per [1], isn't it ? With CAS the remember me feature is managed by the CAS Server, and also the SSO session time out ([2]), so in this case the native session manager seems not to be needed (nor compatible), but it could be the default configuration for Apache Isis webapps, with the advantages you pointed out. Just to point others interested on CAS and Shiro, there's a really simple demo project right here [3]. Thanks again for sharing your conclusions when figured out. Regards, Oscar [1] http://shiro.apache.org/web.html [2] https://wiki.jasig.org/display/CASUM/HOWTO+Configure+Single+Sign+On+Session+Timeout [3] https://github.com/leleuj/cas-shiro-demo El 06/09/2013, a las 23:42, David Tildesley davo...@yahoo.co.nz escribió: Hi Oscar, David (me) wrote: I guess if you don't have desktop (kerberos) SSO to the CAS sts then you haven't got the same issue as us if you keep the cas token timeout less than the http session timeout. Scrub that previous assumption - you will have the same problem if the user is accessing other services and therefore keeping the CAS SSO token alive - they will arrive back at the application with the http session expired but with a valid CAS token and Shiro will dutifully authenticate them and pass them to a resource with a brand new session - same potential for a bad user experience. Our solution (when we figure it all out) should work for your scenarios also. David. From: David Tildesley davo...@yahoo.co.nz To: users@isis.apache.org users@isis.apache.org Cc: dev d...@isis.apache.org Sent: Saturday, 7 September 2013 9:37 AM Subject: Re: Isis session and transaction management on a custom viewer Hi Oscar, That's good (CAS) where Shiro has a plugin. We (it's not my money) weren't prepared to invest in writing a Kerberos authentication plugin for Shiro when Weblogic already does Kerberos authentication and it's already got the tick from Ent architecture. I'll let you know what conclusions we come to on the session timeout and logout - it's all about giving the user a good experience as SSO can confuse them when it seamlessly logs them back in but they get a different session. Cheers, David. From: GESCONSULTOR - Óscar Bou o@gesconsultor.com To: users@isis.apache.org; David Tildesley davo...@yahoo.co.nz Cc: dev d...@isis.apache.org Sent: Saturday, 7 September 2013 3:17 AM Subject: Re: Isis session and transaction management on a custom viewer Hi, David. Really interesting. This second we plan to integrate with the CAS SSO platform the Isis domain, as detailed in [1]. Authentication in CAS, authorization in Domain, thanks to Shiro (and also on CAS on ). It would be helpful to know about your approach to logout and session timeout when you implement it. But in our case seems that CAS will manage that functionality, instead of Shiro. Thanks, Oscar [1] http://shiro.apache.org/cas.html El 06/09/2013, a las 12:52, David Tildesley davo...@yahoo.co.nz escribió: Hi Dan, Dan wrote: If using Isis' Shiro integration for authenticaiotn/authorizatino, then there are also Shiros session management to consider [4]. I am pretty sure the default for that is also HttpSession, but it would seem to be pluggable and they say it supports clusters [5]. You're right. Played with this by co-incidence today. I think this default causes some loss of useful Shiro features (deferring to the container). Turned on Shiro native session manager today by simple property in Shiro.ini as per Shiro documentation[4]. Works ok and adds more capability (e.g. ability to define Shiro session event listener,define Shiro session timeout, ...). We are leaning towards form based container based authentication (already hooked Shiro into trusting container authentication and leaving Shiro to do authorisation). Reason is that we are using container authentication for NegotiateAssertion for enterprise desktop SSO (Kerberos) and we make this a permanent feature and also have a fall through (SUFFICIENT) AD ldap authenticator defined as next container authentication provider - simply to make life easy for the testers. We hope to log events off the Shiro session events (start, stop, ...) . But we've still got work to do around this and the side affects (e.g. session timeout and logout behaviour). If using native session manager then need to name the Shiro session cookie something other than the default JSESSIONID because it causes weirdness when the container also produces a session cookie of the same name. David. [2] http
Re: Screencast #3
Just to clarify, the point is that our current viewer, based on Wavemaker, is implemented in DOJO, and we have all screen widgets composition code. As we must refactor the Isis session management, perhaps a good solution would be to re-use the js viewer code, but, as you pointed out, that will be better done on the future project with Stef and Richard. Thanks and keep the good work, Oscar El 06/09/2013, a las 22:47, GESCONSULTOR o@gesconsultor.com escribió: Yes, that was what I meant. Thanks! El 06/09/2013, a las 21:15, Bhargav Golla bhargav.go...@gmail.com escribió: I am sorry. I didn't exactly understand your question. Are you asking if we can use my code with minor changes, to use it with other UI libraries? If so, currently, no. As part of my plan post GSoC, as discussed with Dan, I would be working on something similar to this idea, with what Stef and Richard are working on in Spiro. We will work to improve their models file to act as a complete interface to all Isis interactions, so that developers can then develop any JS viewer by making use of this models file. Bhargav Golla Developer. Freelancer. B.E (Hons.) Computer Science BITS-Pilani Github http://www.github.com/bhargavgolla | LinkedINhttp://www.linkedin.com/in/bhargavgolla | Website http://www.bhargavgolla.com/ On Sat, Sep 7, 2013 at 12:32 AM, GESCONSULTOR o@gesconsultor.comwrote: Looks really well, Bhargav. Just to know, Would it be relatively easy to reuse the classes interacting with Isis (for obtaining properties and collections, updating properties or executing actions) on an existing project made with other JavaScript UI libraries, like ExtJS, Vaadin or the ones here [1]? Thanks, Oscar [1] http://speckyboy.com/2010/05/17/15-javascript-web-ui-libraries-frameworks-and-libraries/ El 06/09/2013, a las 20:43, Bhargav Golla bhargav.go...@gmail.com escribió: As Dan rightly pointed out, replaced the captions to top of video and have added new captions to annotate the video better. The video is now live here[1]. I have added the screencast of work I had done yesterday also. [1] http://youtu.be/o_REbP2OlNU Regards Bhargav Golla Developer. Freelancer. B.E (Hons.) Computer Science BITS-Pilani Github http://www.github.com/bhargavgolla | LinkedINhttp://www.linkedin.com/in/bhargavgolla | Website http://www.bhargavgolla.com/ On Fri, Sep 6, 2013 at 1:10 PM, Dan Haywood d...@haywood-associates.co.ukwrote: Hi Bhargav, thanks for doing this, you've been making good progress. One thing though... the caption at the bottom obscures the toastr notifications. Could you redo that bit and upload a new version of the screencast? Also, perhaps you could rework the captions so that they change, and identify what is being demonstrated. It can be a little hard to follow as it stands. Thx Dan On 5 September 2013 20:15, Bhargav Golla bhargav.go...@gmail.com wrote: Hello I have uploaded the updated screencast on youtube. Viewer gets object's collections and performs actions on objects (apart from Add/Remove Dependency, which is part of this sprint). You can find the same here[1]. [1] http://youtu.be/Y5eVBY4Kh1s Regards Bhargav Golla Developer. Freelancer. B.E (Hons.) Computer Science BITS-Pilani Github http://www.github.com/bhargavgolla | LinkedIN http://www.linkedin.com/in/bhargavgolla | Website http://www.bhargavgolla.com/
Re: [DISCUSSION] next gen viewer
First of all, the meeting is a great idea ! Count, at least, with me... On those dates, perhaps one mate can join. Regarding the UI, I'm also a big fan of bootstrap. As there's a clear distinction between code and themes, and with such high adoption, in the future we will be able to change the UI appearance easily (for selling software that's a really important point, competing with packages with similar functionalities). Regarding the tab metaphor, we are using it together with modal forms (in excess, I would say... And as we don't have a modern theme right now seems a bit updated; that was also a plus for the wicket migration to bootstrap :-). We like the SPA metaphor, but a proper mechanism for navigating and bookmarking an entity's form or action form is needed. Seeing the Spiro screenshots, the navigation metaphor, including the + , seems a good idea, but as it's opening the linked entity to the right (on current screenshots) instead of directly opening the entity's page (or SPA form), I'm not sure about user-adoption. It also requires the right part of the screen (on those screenshots) to be empty, in order to show it. Perhaps there's a slight variation that could adapt better to user expectations and screen size. When first clicked, the entity could show on a modal form (not loosing the main context). In that modal form the + button would be available and, when clicked, it would changed the context by closing the modal form and opening on the main screen that entity's form - or action form -. Not sure... Perhaps some user-adoption tests needed :-) Regards, Oscar El 07/09/2013, a las 10:25, Dan Haywood d...@haywood-associates.co.uk escribió: Breaking this out to a new thread... ~~~ Over the last few days I've (coincidentally) been having off-list discussions with both Maurizio and Jeroen, thinking about what the next gen viewer should be implemented and might look like. We're all agreed, I think, that it should be a stateless RO-based viewer, and that it should build on Spiro [1]. In other words, the next gen viewer will be an SPA app, with AngularJS underneath, making RESTful calls to the Isis-provided backend. The SPA app would (as they all do) use some sort of templating framework and widget framework for generate the GUI. For the latter, I think that Bootstrap is a candidate (though Jeroen didn't agree, I think). Although (hopefully) scalable to the internet, the intent should still primarily be for problem solvers, not process followers, ie for those who are familiar with the domain. What that implies is solving the modality problem; allowing the user to switch context and to associate different contexts. The original DnD viewer - whatever other faults it might have had - was very good at supporting this, with its desktop (windowed) metaphor. Adam Howard's (currently stagnant) AROW viewer [2] also adopts a desktop metaphor. At the other end of the spectrum, my Wicket viewer is very page oriented. This means that the user looks only at one object at a time. The autocomplete stuff makes it easier to associate stuff, and the bookmarks panel helps provide some sense of context, but I'm the first to admit that the Wicket viewer is closer to a website than an webapp. Maurizio's DHTMLX viewer is more page oriented [3], but the use of tabs does go a long way to mitigating this. I probably should acknowledge that tabs is a better metaphor for helping the user to maintain context than the sliding bookmarks I've implemented in the Wicket viewer. Anyway... no work on a new RO viewer is going to happen this side of Xmas, but it might be worth arranging some sort of get together over a offsite weekend (in Europe, somewhere) to thrash out ideas.I'm thinking something like Mar~May next year (depending on how well Estatio beds in when it goes live). Let me know your thoughts, and whether you'd be interested in meeting up to discuss this (or any other Isis-related stuff, I suppose). Cheers Dan [1] https://github.com/nakedobjectsgroup/spiro [2] http://simple-dusk-6870.herokuapp.com/arow-fpc.html [3] http://isis-viewer-dhtmlx.appspot.com On 7 September 2013 09:03, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: Just to clarify, the point is that our current viewer, based on Wavemaker, is implemented in DOJO, and we have all screen widgets composition code. As we must refactor the Isis session management, perhaps a good solution would be to re-use the js viewer code, but, as you pointed out, that will be better done on the future project with Stef and Richard. Thanks and keep the good work, Oscar El 06/09/2013, a las 22:47, GESCONSULTOR o@gesconsultor.com escribió: Yes, that was what I meant. Thanks! El 06/09/2013, a las 21:15, Bhargav Golla bhargav.go...@gmail.com escribió: I am sorry. I didn't exactly understand your question. Are you
Re: [DISCUSSION] next gen viewer
+1 To David :-)) With ISIS able to generate many viewers, then perhaps we are looking at the real game changer in the enterprise being ISIS. Ooh, please keep saying that! (Still hoping for one of the opinion formers of the tech community - the Martin Fowlers etc - to rediscover NO via Isis and take a similar view). El 07/09/2013, a las 12:22, Dan Haywood d...@haywood-associates.co.uk escribió: On 7 September 2013 11:02, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: First of all, the meeting is a great idea ! Count, at least, with me... On those dates, perhaps one mate can join. Good stuff... I thought you might be interested! Regarding the UI, I'm also a big fan of bootstrap. As there's a clear distinction between code and themes, and with such high adoption, in the future we will be able to change the UI appearance easily (for selling software that's a really important point, competing with packages with similar functionalities). Yeah, themeability is important if Isis is to succeed as a framework. Regarding the tab metaphor, we are using it together with modal forms (in excess, I would say... And as we don't have a modern theme right now seems a bit updated; that was also a plus for the wicket migration to bootstrap :-). We like the SPA metaphor, but a proper mechanism for navigating and bookmarking an entity's form or action form is needed. The ideal might be to find some way of combining the hierarchical grouping capability of the sliding bookmark panel with the accessibility of the tabs. Perhaps each tab is the root aggregate, but lets the user select any object within the aggregate. These are the sort of ideas we should kick around in a face-to-face meetup. Seeing the Spiro screenshots, the navigation metaphor, including the + , seems a good idea, but as it's opening the linked entity to the right (on current screenshots) instead of directly opening the entity's page (or SPA form), I'm not sure about user-adoption. It also requires the right part of the screen (on those screenshots) to be empty, in order to show it. Perhaps there's a slight variation that could adapt better to user expectations and screen size. When first clicked, the entity could show on a modal form (not loosing the main context). In that modal form the + button would be available and, when clicked, it would changed the context by closing the modal form and opening on the main screen that entity's form - or action form -. Not sure... Perhaps some user-adoption tests needed :-) Yeah, coming up with a usable generic UI is non-trivial, irrespective of the actual technologies used. They are going to be doing some more work on Spiro soon; that might come up with some more ideas. Cheers Dan Regards, Oscar El 07/09/2013, a las 10:25, Dan Haywood d...@haywood-associates.co.uk escribió: Breaking this out to a new thread... ~~~ Over the last few days I've (coincidentally) been having off-list discussions with both Maurizio and Jeroen, thinking about what the next gen viewer should be implemented and might look like. We're all agreed, I think, that it should be a stateless RO-based viewer, and that it should build on Spiro [1]. In other words, the next gen viewer will be an SPA app, with AngularJS underneath, making RESTful calls to the Isis-provided backend. The SPA app would (as they all do) use some sort of templating framework and widget framework for generate the GUI. For the latter, I think that Bootstrap is a candidate (though Jeroen didn't agree, I think). Although (hopefully) scalable to the internet, the intent should still primarily be for problem solvers, not process followers, ie for those who are familiar with the domain. What that implies is solving the modality problem; allowing the user to switch context and to associate different contexts. The original DnD viewer - whatever other faults it might have had - was very good at supporting this, with its desktop (windowed) metaphor. Adam Howard's (currently stagnant) AROW viewer [2] also adopts a desktop metaphor. At the other end of the spectrum, my Wicket viewer is very page oriented. This means that the user looks only at one object at a time. The autocomplete stuff makes it easier to associate stuff, and the bookmarks panel helps provide some sense of context, but I'm the first to admit that the Wicket viewer is closer to a website than an webapp. Maurizio's DHTMLX viewer is more page oriented [3], but the use of tabs does go a long way to mitigating this. I probably should acknowledge that tabs is a better metaphor for helping the user to maintain context than the sliding bookmarks I've implemented in the Wicket viewer. Anyway... no work on a new RO viewer is going to happen this side of Xmas, but it might be worth arranging some sort of get together over a offsite
Re: Using JDO helper methods to check existence of an object for a test
I've just been thinking about a way to avoid to define a Spec Transformer for every Entity class in the Domain. As it's just infrastructure software, I thought that was just enough. The attached code allows to use just one Spec Transformer when the Glue is written like this: - the employee with name PETER - the employee named PETER - the property with reference REF-001 - the property referenced REF-001 - the product with id PR-001 From there, we know that: - The Entity singular name is employee (so it can be obtained from the Isis Object Specifications, reinforcing the Ubiquitous Language use on BDD specifications). - We must search by name - The name must be PETER For using it, I must define a Glue like this one: Define a Glue like this one: @When(The company (employee with name \[^\]*\) has a role assigned) public void the_company_employee_with_name(@Transform(GenericIsisJdoTransformer.class) final Employee employee) { ... } First proof-of-concept code version follows this text. It can be improved in many ways, for allowing customization through inheritance, avoiding JDO through the use of the Apache Isis query methods, etc. But I would let you know, right to know if you think it can be useful. On this way, the only implemented classes are the ones supporting the Glues (and only the Spec Transformers for more specific use cases). HTH, Oscar - package com.xms.framework.testing.integration.spectransformers; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.jdo.Query; import org.opensaml.artifact.InvalidArgumentException; import org.apache.isis.applib.DomainObjectContainer; import org.apache.isis.core.metamodel.spec.ObjectSpecification; import org.apache.isis.core.runtime.system.context.IsisContext; import org.apache.isis.core.specsupport.scenarios.ScenarioExecution; import org.apache.isis.objectstore.jdo.datanucleus.service.support.IsisJdoSupportImpl; /** * Requires the Gherkin's capture in the format '([entitySingularName] [(.+?) * name(d)|(.+?) reference|(.+?) id] \[entityId]\)'. * p * For example: * ul * lithe employee with name PETER/li * lithe employee named PETER/li * lithe property with reference REF-001/li * lithe property referenced REF-001/li * lithe product with id PR-001/li * /ul * p * For matching the first one we will need the following Gherkin regular * expression: * ul * li * \\@When(The company's (employee with name \[^\]*\) has a role assigned)/li * /ul * p * From there, we know that: * ul * liThe Entity singular name is employee./li * liWe must search by name/li * liThe name must be PETER/li * /ul * */ public class GenericIsisJdoTransformer extends NullRecognizingTransformerObject { private static MapString, ObjectSpecification specificationsBySingularName; /** * Tries to obtain the Entity class name, id and search field from the * Cucumber capture, and find it on the JDO Object Store. * * @see com.xms.framework.testing.integration.spectransformers. * NullRecognizingTransformer#transformNonNull(java.lang.String) */ @Override protected Object transformNonNull(final String capture) { return this.findFromCapture(capture); } /** * @param entityName *Name of the Entity specified on the Gherkin's capture. * @return */ private ObjectSpecification specificationOf(final String entityName) { if (IsisJdoTransformer.specificationsBySingularName == null) { IsisJdoTransformer.specificationsBySingularName = new HashMapString, ObjectSpecification(); for (final ObjectSpecification current : IsisContext.getSpecificationLoader().allSpecifications()) { IsisJdoTransformer.specificationsBySingularName.put(current.getSingularName().toLowerCase(), current); } } return IsisJdoTransformer.specificationsBySingularName.get(entityName.toLowerCase()); } private final Class? entityClassFrom(final String capture) { // The Entity Id will be between . String entityName = ; final String[] recognizedPatterns = { ( with name ), ( named ), ( with reference ), ( referenced ), ( with id ) }; for (final String currentPattern : recognizedPatterns) { final Pattern p = Pattern.compile(currentPattern); final Matcher m = p.matcher(capture); if (m.find()) { entityName = capture.substring(0, m.start()); break; } } if (entityName == ) { throw new InvalidArgumentException(String.format(Cannot find the entity's name on the capture %s. The format must be '([entitySingularName] [with name|with reference|named|referenced] \[entityId]\)', capture)); } final ObjectSpecification specification =
Re: Isis session and transaction management on a custom viewer
Thanks for the detailed explanation and the links to those resources. As we currently have an Apache Isis integration with our viewer, we knew the high-level structure, but it needs to be improved (experiencing some session or transaction management problems that originated the request). We are interfacing Isis only through generic repositories (responsible of generating screens, etc.) and a generic action execution service (that finds the proper Object Specification, etc.). We are obtaining the proper choices, default values, hidden state, (not auto-complete by now; at most in 2 weeks), etc. With the provided information we expect to being able to solve those session handling problems. We will look at them in detail, and come here if any doubt is raised. Thanks again, Oscar El 05/09/2013, a las 15:52, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, apols for the delay in replying on this; within... And, I'm cc'ing this to dev@i.a.o; I think it belongs there better. Dan On 26 August 2013 15:45, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: [snip] ... we have some questions about current design: 1.- Stateful (Wicket) vs Stateless (RestFul Objects): why the Wicket viewer needs to hold the state, The Apache Wicket framework is stateful, that's just the way it is. In fact, it's one of the principles of the framework to handle this [2]. One needs to be aware of this [3]. from an Apache Isis perspective? Just to hold the current user context information? No, more than this. Every component (widget) in the page is backed by a Wicket model (LoadableDetachableModel); these must be serializable because they are stored in the session. Isis entities are not serializable (nor would we want them to be), but the OIDs are (eg TODO|123). Isis handles this by providing mementos (for entity, property, collection, action, parameter). Thus, EntityModel is a Wicket model that wraps an ObjectAdapterMemento. But, yes, Isis itself does also have a session which represents the current user. This is its org.apache.isis.core.commons.authentication.AuthenticationSession. Isis delegates to Wicket to store this for it in the HttpSession; this is done through org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis (IsisWicketApplication#getWebSessionClass). By this, Wicket keeps track of the user making the request. If using Isis' Shiro integration for authenticaiotn/authorizatino, then there are also Shiros session management to consider [4]. I am pretty sure the default for that is also HttpSession, but it would seem to be pluggable and they say it supports clusters [5]. Why to choose for other webapps integrating with Isis the stateful design, instead of the - more scalable - stateless design? Umm. As [3] says, Wicket's reliance on session management means it wouldn't be suitable for an Amazon scale website. But I believe it's an appropriate technology for a typical enterprise app (that might use a farm of clustered servers for big deployments). Restful Objects in contrast is deliberately stateful. There is still the user identity issue to contend with, but that's pluggable. I hope that someone (who knows more about this than me) might help work through an oauth or equivalent implementation. My understanding (I'm by no means a security expert on this) is that these solutions are scalable because the user credentials ultimately are stored in HTTP headers (encrypted suitably, of course, according to the oauth protocols etc etc). 2.- Is there any class we can inherit from for stateless or stateful clients, that will be maintained in the future, as Apache Isis evolve, that takes care of web session handling, security (shiro) session, transaction management, etc. ? Perhaps we can inherit from classes currently existing on the Wicket viewer (or the Restful Objects viewer). Look at the classes above as a start point, see if you can untangle them. There is a ticket to better integrate Shiro and Wicket [6]. Right now we logout of the Wicket viewer by invalidating Wicket's authentication session. However, Shiro doesn't know about this, so it preserves its sessions. We do (seemingly) still get the behaviour we want, but improvements could be made here. 3.- Is there any other point we must take into account with this approach - the custom viewer interacting with the Apache Isis domain - ? The biggest immediate risk is that you get the scoping wrong. There is a reasonably clear separation of scopes; see ApplicationScopedComponent, SessionScopedComponent, TransactionalScopedComponent. There's an old diagram I did [7] which shows this (it might be a bit out of date, but shows the general pattern). The biggest ongoing risk is that - because the API is not formally documented - that we change the code and break the custom
Re: Isis session and transaction management on a custom viewer
Hi, David. Really interesting. This second we plan to integrate with the CAS SSO platform the Isis domain, as detailed in [1]. Authentication in CAS, authorization in Domain, thanks to Shiro (and also on CAS on ). It would be helpful to know about your approach to logout and session timeout when you implement it. But in our case seems that CAS will manage that functionality, instead of Shiro. Thanks, Oscar [1] http://shiro.apache.org/cas.html El 06/09/2013, a las 12:52, David Tildesley davo...@yahoo.co.nz escribió: Hi Dan, Dan wrote: If using Isis' Shiro integration for authenticaiotn/authorizatino, then there are also Shiros session management to consider [4]. I am pretty sure the default for that is also HttpSession, but it would seem to be pluggable and they say it supports clusters [5]. You're right. Played with this by co-incidence today. I think this default causes some loss of useful Shiro features (deferring to the container). Turned on Shiro native session manager today by simple property in Shiro.ini as per Shiro documentation[4]. Works ok and adds more capability (e.g. ability to define Shiro session event listener,define Shiro session timeout, ...). We are leaning towards form based container based authentication (already hooked Shiro into trusting container authentication and leaving Shiro to do authorisation). Reason is that we are using container authentication for NegotiateAssertion for enterprise desktop SSO (Kerberos) and we make this a permanent feature and also have a fall through (SUFFICIENT) AD ldap authenticator defined as next container authentication provider - simply to make life easy for the testers. We hope to log events off the Shiro session events (start, stop, ...) . But we've still got work to do around this and the side affects (e.g. session timeout and logout behaviour). If using native session manager then need to name the Shiro session cookie something other than the default JSESSIONID because it causes weirdness when the container also produces a session cookie of the same name. David. [2] http://wicket.apache.org/meet/introduction.html [3] http://www.jtict.com/blog/wicket-isnt-suited-for-websites/ [4] http://shiro.apache.org/session-management.html [5] http://shiro.apache.org/web.html#Web-ServletContainerSessions [6] https://issues.apache.org/jira/browse/ISIS-299 [7] https://github.com/apache/isis/blob/master/core/src/docbkx/guide-runtime-to-incorporate/images/architecture.png
Re: [DISCUSSION] Should we refactor the Wicket viewer to use Bootstrap?
+1 to the refactoring. Currently we are forced to maintain our current custom viewer, but with a more easily customized viewer we could migrate it. I think that the automatic viewer generation is the most valued feature of the Isis framework, but the current implementation is not as flexible as it's expected for customizations. I guess it would gain a lot of supporters between leads and prospects that can consider Apache Isis in the near future. It can be a big driver for adoption. Regards, Oscar El 03/09/2013, a las 09:12, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Cuneyt, good to hear you've had good experiences going this way. Yes, that does like an existing integration that would be well worth considering. I guess for the moment I'm canvassing whether bootstrappifying is in itself a good idea (rather than how to go about doing this). Thx Dan On 3 September 2013 07:48, Cuneyt Ozen cune...@gmail.com wrote: Hi Dan, How about wicket-bootstrap https://github.com/l0rdn1kk0n/wicket-bootstrap ? I have been doing fair amount of work with it lately. And I am pretty much contented with it. Cheers, Cuneyt On Mon, Sep 2, 2013 at 9:43 PM, Dan Haywood d...@haywood-associates.co.uk wrote: Hi folks, A few days back [1] Ezequiel asked a question about how to style the CSS in Wicket viewer, and Oscar provided a few pointers (thanks for that, by the way...). Even so, my suspicion is that restyling the look and feel of the whole app is a lot more work than it ought to. At the same time, in the recent work I did on dynamic layouts [2,3,4,5], I introduced a dependency on the Bootstrap library [6], just for the grid layout. But, it seems to me that we could probably refactor the Wicket viewer to adopt all of the Bootstrap components. Given that Bootstrap supports LESS, a custom skin could be implemented just by using Bootstrap's customization page [8]. Or, there are lots of pre-built themes out there eg [9,10]. So, what do people think? Is this a piece of work worth doing? (And, would anyone be interested in helping out if so... :-) Cheers Dan [1] http://markmail.org/message/tdidddjuher6yqac [2] https://issues.apache.org/jira/browse/ISIS-468 [3] https://issues.apache.org/jira/browse/ISIS-469 [4] https://issues.apache.org/jira/browse/ISIS-470 [5] https://issues.apache.org/jira/browse/ISIS-475 [6] http://getbootstrap.com/ [7] http://getbootstrap.com/css/#grid [8] http://getbootstrap.com/customize/ [9] http://bootswatch.com/ [10] https://wrapbootstrap.com/
Re: CSS Style in application.css (For use the Bookmark Slide BAR)
Hi, Ezequiel. I doubt there's a documented list, but perhaps you can find them alltogether on the source code directory at [1]. Specifically, you can find of interest: - Components at [2]. - Pages at [3]. - Links at [4]. - Tabs at [5]. Please, share a screen capture when finished :-) HTH, Oscar [1] https://github.com/apache/isis/tree/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui [2] https://github.com/apache/isis/tree/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components [3] https://github.com/apache/isis/tree/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages [4] https://github.com/apache/isis/tree/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/selector/links [5] https://github.com/apache/isis/tree/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/tabs El 30/08/2013, a las 19:30, Ezequiel Celiz elce...@gmail.com escribió: Hi community, I'm trying to remove the scroll bar Bookmarkable and I think that I can find the solution by using the CSS properties, applying them in the application.css file. This help me with what I really want to do that is to change the style of every html element that the framework use. In order to do that, I need to know the name of the classes/id of each of them. I've been searching some examples but it would be really helpfull y you can provide me the complete list of them. thank you very much!
New Apache Isis templates for JDO managed relationships
Hi to all. I've just made a commit which contains a new set of templates for the Eclipse Java Editor, that automatically add all required annotations for JDO managed relationships. If properly used and configured, DataNucleus JDO implementation automatically updates both sides of a bidirectional relationship. There is a specific DataNucleus webpage detailing this behavior [1], and a specific webpage on the Apache Isis website [2]. Includes support for: - 1:n bidirectional relationship (implemented using a foreign key). - 1:n bidirectional relationship (implemented using a join table). - 1:n unidirectional relationship (implemented using a foreign key). - 1:n unidirectional relationship (implemented using a join table). - m:n unidirectional bidirectional relationship (for the entity acting as the parent). - m:n unidirectional bidirectional relationship (for the entity acting as the child). The Eclipse template can be downloaded from [3], under the link named Isis domain object snippets. All new templates start with the isc-jdo prefix. If anybody experience any issues, please, report them back and they will be solved ASAP. Thanks, Oscar [1] http://www.datanucleus.org/products/datanucleus/jdo/orm/relationships.html [2] http://isis.apache.org/components/objectstores/jdo/managed-1-to-m-relationships.html [3] http://isis.apache.org/getting-started/editor-templates.html
Re: [ANNOUNCE] New committer - Oscar Bou
for new or existing projects). So JDO is really a great addition (giving support for NoSQL databases, for example) where, once supported, JPA does not introduce technical benefits, but can bring a bigger user-base (also lowering the risks of adopting Isis). Hope this has clarified my viewpoints. Regards, Oscar [1] http://en.wikipedia.org/wiki/Multitier_architecture [2] http://engineering.nulogy.com/posts/hexagonal-architecture-for-rails-developers/ [3] http://isis.apache.org/components/viewers/restfulobjects/about.html [4] http://www.infoq.com/articles/Intro_Restful_Objects [5] https://www.google.com/search?q=risk+matrix+exampleum=1ie=UTF-8hl=estbm=ischsource=ogsa=Ntab=wiei=AvoJUpfIBofZPPCRgOgMbiw=1280bih=606sei=BPoJUq_LF4ec0QXC-YAY El 13/08/2013, a las 00:39, David Tildesley davo...@yahoo.co.nz escribió: Good stuff Oscar. A few comments: I think there needs to be a continued and strong focus on the generated UI(s) which is frankly the sweet spot for NO/ISIS that is unmatched in any other system. DDD is easily achieved without NO/ISIS. For us ISIS is going to live or die based on what we can achieve with the generated UI. JDO is good - not sure why we would want to swap to JPA which only supports relational databases. Regards, David. From: GESCONSULTOR - Óscar Bou o@gesconsultor.com To: users@isis.apache.org Cc: dev d...@isis.apache.org Sent: Tuesday, 13 August 2013 2:12 AM Subject: Re: [ANNOUNCE] New committer - Oscar Bou First of all, excuse for this quite long email, but I'm really grateful for being accepted as a committer to Apache Isis, and I would like to express the reasons behind this commitment in the hope it helps other list subscribers to move to Apache Isis, and also to contrast my thoughts. Our first driver towards moving to Apache Isis was not its automatic UI generation through its viewer technology (which could be seen as its main advantage by some developers). We already had a working app and our own User Interface. It was due to the support of a shared vision about the capability to translate the business rules implemented in the domain to all related technologies working with it, including (but not only) the User Interface. It should help a lot in the support of the Hexagonal architecture pattern ([1], [2]). The Apache Isis meta-model has allowed to directly support distinct viewers implemented with different technologies, including the support of a full specification of a REST interface to the core domain [3] (which can ease a lot of internal teams to implement further Hexagonal architecture adapters, such as custom interfaces in different technologies for external teams, in a fully automated and supported manner). I envision Apache Isis as the least risky approach to DDD in common business domains due to the following strengths: 1. It allows to start focused on the highest risk, the domain: - With Apache Isis you just have to concentrate on the domain and a custom User Interface and REST API are automatically generated and updated, allowing really fast inputs about the current domain implementation. Work on less-risky areas (such as the UI) can be easily postponed. 2. It allows to start easy when the expectations about the domain complexity are not high, or, at least, not as clear to decide to invest on a full DDD approach: - Implementing a basic domain can be nearly as easy as on Microsoft Access by using the current Archetype, the Eclipse templates and the available Viewers (as the Apache Wicket viewer for automating the webapp implementation). - As new business rules are discovered, they can be incorporated to the Apache Isis domain, and are automatically propagated to (used by) the viewers. - Unlike scaffolding technologies, the user interface and other architectural adapters behave dynamically and adapt intelligently to the current domain implementation by means of the Apache Isis meta-model, which eases a lot the domain improvements, application maintenance and technology upgrades. 3. It eases to start, explore and evolve the domain with full domain testability, through the new support for Behavior-Driven Development: - The business expert and the developer can work together on defining features and business scenarios that can be implemented and tested with Apache Isis. - And as the user interface, the BDD behavior, the fixtures, etc. are supported by Isis, it allows really rapid iteration cycles focusing on the domain, so the project risk is rapidly detected and minimized by the experts and developers. As in all software projects, there is space for improvement, and it could be among others in the following areas: * Improved domain business rules support. It must be the core strength of Apache Isis (where the viewer and other related technologies are a derivative
Re: [ANNOUNCE] New committer - Oscar Bou
First of all, excuse for this quite long email, but I'm really grateful for being accepted as a committer to Apache Isis, and I would like to express the reasons behind this commitment in the hope it helps other list subscribers to move to Apache Isis, and also to contrast my thoughts. Our first driver towards moving to Apache Isis was not its automatic UI generation through its viewer technology (which could be seen as its main advantage by some developers). We already had a working app and our own User Interface. It was due to the support of a shared vision about the capability to translate the business rules implemented in the domain to all related technologies working with it, including (but not only) the User Interface. It should help a lot in the support of the Hexagonal architecture pattern ([1], [2]). The Apache Isis meta-model has allowed to directly support distinct viewers implemented with different technologies, including the support of a full specification of a REST interface to the core domain [3] (which can ease a lot of internal teams to implement further Hexagonal architecture adapters, such as custom interfaces in different technologies for external teams, in a fully automated and supported manner). I envision Apache Isis as the least risky approach to DDD in common business domains due to the following strengths: 1. It allows to start focused on the highest risk, the domain: - With Apache Isis you just have to concentrate on the domain and a custom User Interface and REST API are automatically generated and updated, allowing really fast inputs about the current domain implementation. Work on less-risky areas (such as the UI) can be easily postponed. 2. It allows to start easy when the expectations about the domain complexity are not high, or, at least, not as clear to decide to invest on a full DDD approach: - Implementing a basic domain can be nearly as easy as on Microsoft Access by using the current Archetype, the Eclipse templates and the available Viewers (as the Apache Wicket viewer for automating the webapp implementation). - As new business rules are discovered, they can be incorporated to the Apache Isis domain, and are automatically propagated to (used by) the viewers. - Unlike scaffolding technologies, the user interface and other architectural adapters behave dynamically and adapt intelligently to the current domain implementation by means of the Apache Isis meta-model, which eases a lot the domain improvements, application maintenance and technology upgrades. 3. It eases to start, explore and evolve the domain with full domain testability, through the new support for Behavior-Driven Development: - The business expert and the developer can work together on defining features and business scenarios that can be implemented and tested with Apache Isis. - And as the user interface, the BDD behavior, the fixtures, etc. are supported by Isis, it allows really rapid iteration cycles focusing on the domain, so the project risk is rapidly detected and minimized by the experts and developers. As in all software projects, there is space for improvement, and it could be among others in the following areas: * Improved domain business rules support. It must be the core strength of Apache Isis (where the viewer and other related technologies are a derivative work). And it could include: - domain objects that behave by default conforming to all business rules defined (i.e., wrapped by default, a controversial point, I'm sure), - direct JSR-349 supporting facets, etc. * Support for migrating existing projects to Apache Isis. There is a high and fast growth vector for the community by being adopted by currently existing applications. But for that, official APIs should be provided for: - Custom viewers support: easing the interaction with custom-made pre-existing User Interfaces (through the REST API, but also through Java APIs). It should include fully-supported API classes or interfaces for Apache Isis session handling, transaction management, etc. - JPA support: most Java applications use at the persistent layer the JPA API or the custom Hibernate API. The initial support for JPA could be based on DataNucleus, allowing to migrate all persistent domain classes and logic inside them. Directly supporting other persistence ORM platforms is a bigger effort that could be postponed in my opinion. * More project examples available. - We traditionally had the ToDo example on the archetype, the claims example of the Naked Objects book, the excellent Transport Planner application, and few more examples (perhaps a web page is needed for referencing together all available examples?). - The Estatio project has been a milestone for Apache Isis, and we are constantly exploring it. There are quite hidden gems inside it about Apache Isis implementation, but also about generic domain implementation (as the Interfaces decorating the entities,
Re: rules externalised from the code
Nice solution! On the latest snapshot is possible by using the new executeSql(...) method in the IsisJdoSupport service. El 07/08/2013, a las 09:37, David Tildesley davo...@yahoo.co.nz escribió: Would JDO query be a candidate (assuming the query text can be associated with an object and loaded from a persistent source at run-time and then executed)? Regards, David. From: David Tildesley davo...@yahoo.co.nz To: users users@isis.apache.org Sent: Wednesday, 7 August 2013 6:44 PM Subject: rules externalised from the code Hi, We are looking at building a RBAC capability that evaluates security entitlements for users. The business rule to determine an effective role may be based on a combination of the users attributes. e.g. job title, organisation unit, location, organisation. The rules are not going to be all that complicated e.g. if ((user.jobTitle.name == case worker)) AND (user.org.name == companyA) AND (user.location.code == NY)) then addRole(user, securityRole) but we don't want to have to recompile the application each time a rule changes or a rule is added or removed. Options? e.g. DROOLS rule engine (seems a bit too heavy weight for what we want to achieve). In our case the application is built using ISIS and already contains a domain that has all the HR context required for RBAC determinations. i.e. a full object graph containing all the input information to the RBAC rule would be available.The solution would need to fit nicely with ISIS. Any ideas would be appreciated. N.B. do not get confused with Shiro security for the application - that's orthogonal to the functional capability that we are wanting to build.And yes, I know we can go and buy specialized products that do this functional capability but we have good reasons for not going down that path. Thanks in advance, David.
Re: BDD - Domain Object property not validated after persist ?
] http://isis.apache.org/applib-guide/how-tos/about.html El 06/08/2013, a las 08:15, Dan Haywood d...@haywood-associates.co.uk escribió: Oscar, You've convinced me... we should keep our entities consistent across the layers. More discussion inline below Dan On 5 August 2013 17:00, GESCONSULTOR - Óscar Bou o@gesconsultor.comwrote: But I presume there was a reason that you put your call to AbstractXMSDomainObjectRepositoryAndFactory#.doFindByProp(...) in this closure. Can you tell me explain further for me? The reason is that we are adapting our current viewer (user interface) to Isis. There is common functionality to all screens (such as filtering, searching, saving a domain object, refresh, etc.) that work with methods defined on a base repository (AbstractXMSDomainObjectRepositoryAndFactory). As all Isis interaction is made inside those methods, we surrounded all that logic within a Isis transaction, thinking that would allow as to avoid custom web session filters, etc. It was the closest place to the code interacting with Isis. Can you explain a bit the advantages about why should it be done on a higher layer - the web session - (perhaps if not done through a web session filter it can introduce some session management problems (seeing different object sets or different Isis sessions depending on the session returned by Tomcat - in different states/update time - , etc.). Part of the reason is in keeping the responsibilities of the various implementations consistent with each other. The Wicket viewer and the RO viewer now both set up transactions before doing any work, in other words we are using session/transaction in view design. I only added the IsisTransactionFilterForRestfulObjects very recently; until then it was also relying on the lazy creation of transactions down in the PersistenceManager. But what it also means is that any queries for objects are done without a transaction in place (I guess that the JDO/DN and/or the RDBMS creates one implicitly). I could see in the future that we might want to allow the user to use isolation level 3 rather than level 1, ie guarantee that a transaction exists and is present. At the moment we only ever apply such validation at the UI layer, mediating between the viewer layer and the domain object model/layer. This was not our expectation. And I think this is not the expected behavior in other validation frameworks. I'll further detail this. You've convinced me... we should keep our entities consistent across the layers. I don't know that I really thought otherwise, was just aware that this was an area where the current implementation of Isis was less than ideal. [snip] So, at least, I could expect: - After any action execution, all domain objects are in compliance with all defined invariants. - During action execution, I could understand that objects are not conformant with invariants. - If a property is modified on a viewer, when the object changes are saved/persisted (sent to Isis and, through it, to the database) all invariants are in place. I've been mulling on how we can implement easily implement this. I'm not sure that FrameworkSynchronizer is the right place, because that will be called multiple times throughout the xactn. Instead, in IsisTransaction itself we have several enlistXxx() methods, already called by the JDO objectstore/FrameworkSynchronizer, originally added for auditing and publishing purposes. So, it seems it would be relatively trivial to additionally spin through all enlisted objects, and fire the validation checks on them, just prior to commit. This would be a bit like a pre-commit trigger. Another benefit of this design is that we know that at this point JDO/DN will have locked these objects exclusively, so there is no chance of the objects being changed under our feet. I think this is what the ticket you've raised, ISIS-487, should now implement. If we were on a CQRS architecture, all property changes would be considered a command and the DDD domain invariants would be guaranteed before and after executing a command. And perhaps that would be the meaning of an Isis Transaction, differenciating it from a database transaction or an application layer transaction (such as in SAP, where it's referred as an operations requiring work in one or more than one views, as in a wizard)). I don't see an IsisTransaction as having a different scope to a database transaction; it's a single short-lived transaction in force for the duration of the invocation of an object action (or property edit). But what it can/does provide is this ability to find the enlisted objects and do useful things to/with them. Appreciate you spending the time to make these arguments; good stuff. Dan
Re: BDD - Domain Object property not validated after persist ?
For the last part of the email (property validation) I was just looking again at the JSR-349 specification, whose last version has just been approved and incorporated to Java 7. Seems that the reference implementation (Hibernate Validator) is Apache licensed [1]. How should it be used within an Apache Isis domain implementation? [1] http://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/ El 06/08/2013, a las 19:10, GESCONSULTOR - Óscar Bou o@gesconsultor.com escribió: Thanks for your responses, Dan and Jeroen. Nice to be in such a responsive environment :-) Part of the reason is in keeping the responsibilities of the various implementations consistent with each other. The Wicket viewer and the RO viewer now both set up transactions before doing any work, in other words we are using session/transaction in view design. Ok. We've been working with Hibernate this way without problems. So it's a design option. And clearly, as I was not sure about the Isis transaction management implementation, I implemented the session-per-operation antipattern [1]. As we must implement the session in view for our own viewer (custom Java-Spring-Dojo UI), is there any class we can reuse or inherit from? Or should we copy-and-adapt the IsisTransactionFilterForRestfulObjects for example? This same problem will be experienced by all the other viewers planned (Javascript, DHTMLX, etc.) and also for anybody planning to integrate Isis in their current applications, so it would be good for those use cases to provide and support a generic session filter (similar to Spring's OpenSessionInViewFilter, for example [2]), that is independent of the implementation technology used by the viewer (only on a session). I've been mulling on how we can implement easily implement this. I'm not sure that FrameworkSynchronizer is the right place, because that will be called multiple times throughout the xactn. Instead, in IsisTransaction itself we have several enlistXxx() methods, already called by the JDO objectstore/FrameworkSynchronizer, originally added for auditing and publishing purposes. So, it seems it would be relatively trivial to additionally spin through all enlisted objects, and fire the validation checks on them, just prior to commit. This would be a bit like a pre-commit trigger. Another benefit of this design is that we know that at this point JDO/DN will have locked these objects exclusively, so there is no chance of the objects being changed under our feet. I think this is what the ticket you've raised, ISIS-487, should now implement. I've seen those classes, and seems that it can be the correct way for this use case (validating before persisting), but there's another point detailed next that I don't have as clear. If we were on a CQRS architecture, all property changes would be considered a command and the DDD domain invariants would be guaranteed before and after executing a command. I seems to me that with the previous solution Isis will work as expected when executing an action. But I have more doubts when changing properties. We could consider a change in the value of a property a simple kind of action, inside a setter method. But on Isis we also have other logic attached to a property change (such as the validateXXX, hideXXX, disableXXX, etc.). The first time we looked at Isis and read the How to add business rules section [3], we thought that Isis generated a proxy with CGLIB and when the setter was invoked from any point in the Domain layer code (an action's code, a service programmatic method, etc), the Isis proxy firstly invoked the hiddenXXX, disableXXX and validateXXX methods (as on a wrapped object), in order to verify that the property change was valid. Basically, our expectations when working with code at the domain layer (such as in the domain objects and services actions and programmatic methods, and on BDD unit-integration tests) were that: - property change validation was done by intercepting/proxying the setter call (avoiding the use of any modifyXXX methods). - domain object validation was done before committing to the database (obviously, a user could always perform a custom validation by invoking the proper container's method). The second one is the previously discussed one. But can we also expect the first option - or something equivalent - ? If not implemented, the logic of the domain layer code would not respect the validation rules defined with Isis, forcing the introduction of modifyXXX, addToXXX, removeFromXXX, etc. methods (as in managed relationships), and replacing the normal setter invocations with a custom modifyXXX methods, for example, just with the purpose of preserving the business rules. If, by error, a user invokes directly the setter, the Isis validation logic would not be executed, which could lead