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: datanucleus error when upgrading regarding PreserveCase
Ups!!! Didn't see Dan's response. El 30/7/2015, a las 14:50, Dan Haywood d...@haywood-associates.co.uk escribió: Know it well. That error means that the dom classes haven't been enhanced. Cheers Dan On 30 July 2015 at 13:38, johandoornen...@filternet.nl wrote: Thank you Dan, I overlooked the persistor_datanucleus.properties. But still I am struggling - I cleaned all .m2 caches etc... I keep getting: 14:35:14,737 [Schema main ERROR] An exception was thrown while adding/validating class(es) : null java.lang.NullPointerException at org.datanucleus.store.rdbms.table.ClassTable.getCandidateKeyForUniqueMetaData(ClassTable.java:2569) at org.datanucleus.store.rdbms.table.ClassTable.getExpectedCandidateKeys(ClassTable.java:2509) at org.datanucleus.store.rdbms.table.TableImpl.getSQLAddCandidateKeyStatements(TableImpl.java:1300) at org.datanucleus.store.rdbms.table.TableImpl.createCandidateKeys(TableImpl.java:738) at org.datanucleus.store.rdbms.table.TableImpl.createConstraints(TableImpl.java:427):35:14,737 [Schema main ERROR] An exception was thrown while adding/validating class(es) : null java.lang.NullPointerException at org.datanucleus.store.rdbms.table.ClassTable.getCandidateKeyForUniqueMetaData(ClassTable.java:2569) at org.datanucleus.store.rdbms.table.ClassTable.getExpectedCandidateKeys(ClassTable.java:2509) at org.datanucleus.store.rdbms.table.TableImpl.getSQLAddCandidateKeyStatements(TableImpl.java:1300) at org.datanucleus.store.rdbms.table.TableImpl.createCandidateKeys(TableImpl.java:738) at org.datanucleus.store.rdbms.table.TableImpl.createConstraints(TableImpl.java:427) In the migration notes, Johan. http://isis.apache.org/migration-notes.html cheers Dan On 30 July 2015 at 12:49, wrote: When upgrading to ISIS 1.9.0 and DataNucleus 4.0.0. I get: 1) Error in custom provider, javax.jdo.JDOFatalUserException: Exception thrown setting persistence properties NestedThrowables: java.lang.IllegalArgumentException: Property datanucleus.identifier.case specified with value PreserveCase but this value is invalid. Please check the documentation for valid values at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132) while locating org.apache.isis.core.runtime.system.IsisSystem for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142) while locating nl.matching.app.webapp.MatchingApp 1) Error in custom provider, javax.jdo.JDOFatalUserException: Exception thrown setting persistence properties NestedThrowables: java.lang.IllegalArgumentException: Property datanucleus.identifier.case specified with value PreserveCase but this value is invalid. Please check the documentation for valid values at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132) while locating org.apache.isis.core.runtime.system.IsisSystem for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142) while locating nl.matching.app.webapp.MatchingApp Has anybody a hint? My app was running OK with previous version. grtz Johan
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: Session already open and context not configured for autoclose
Many thanks, Dan. We will try it. Cheers, Oscar El 9/7/2015, a las 18:32, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Nacho (and Oscar) just wanted to come back to you on this old thread. While I don't know that I've exactly pinned down the issue, I have tidied up the code that's there and remove the fail fast logic. time will tell if that ends up being a good decision or not. If you want to inspect the changes, see [1] and [2] Thanks Dan [1] https://issues.apache.org/jira/browse/ISIS-1169 [2] https://github.com/apache/isis/commit/edc4fa7648f73dea2c3be41de24b29ca76af9fe4 On 18 May 2015 at 15:14, Nacho Cánovas Rejón n.cano...@gesconsultor.com wrote: Hi Dan. Don't worry about it, thanks very much. I'm too busy right now to solve it and I will follow your instructions. I did some research before, and I have some information about your theories and options. First of all, I changed DeploymentType from SERVER to SERVER_EXPLORATION, and if I remember correctly, this changed SessionClosePolicy as well, but I had another error instead about transactions I think (sorry I did this three weeks later). So, seems like yoy write, that a session is opened, but this would be closed Then I did some dirty path to IssisSessionFilter to UNDEFINED.handle method. openSession(validSession); SESSION_IN_PROGRESS.setOn(request); try { chain.doFilter(request, response); } finally { UNDEFINED.setOn(request); closeSession(); } return; to try { this.openSession(validSession); SESSION_IN_PROGRESS.setOn(request); chain.doFilter(request, response); } finally { UNDEFINED.setOn(request); this.closeSession(); } With this modification I had same message, but only one time, because thread releases session and like I said, the inconsistency doesn't arrive too often and problem is remaining in this threat when isn't closed. I don't know if this would help, but I'll tell you about my progress. Cheers. El 16/05/2015 a las 14:08, Dan Haywood escribió: Hi Nachos, sorry not to reply before now. OK, so I don't have an immediate solution for you, I'm afraid. But I can talk about what's happening, and perhaps we can work out some sort of way forward. ~~ (As I'm sure you've worked out/know already), we bind the IsisSession (a wrapper for a JDO PersistenceManager, equivalent to a JPA/Hibernate Session) on a thread-local. Within the IsisSession we can have multiple transactions. When the request is finished then the session is (meant to be) unbound from the thread. In Isis the terminology for open and close rather than bind and unbind. The exception happens because Isis is trying to fail fast if it finds that a thread that already has an Isis session attached to it and tries to open a new one. ~~ I have two theories as to why we could encounter this situation. The first is that the previous request on that thread (which might have taken place several seconds or even minutes before) has not properly closed that thread. The second is that actually the current request is somehow trying to open a session twice... not exactly a race condition but something similar. Given your stack trace, which is being thrown from the IsisSessionFilter (whose job it is to set up a session for the request), I doubt it's the second situation. ~~ Two options going forward. The first is to work around it, by removing the fail-fast check. As you can see, the behaviour of Isis is pluggable; we have an SessionClosePolicy. We could, without too much work, introduce a configuration property to allow auto-close policy to be enabled. Second option would be to try to get to the root cause of why the problem is occuring. For that we will need to enable some logging, I think. You'll see that there are lots of debug statements in IsisSessionDefault and also PersistenceSession. There's also, in IsisContextThreadLocal#debugData, some code that dumps all the sessions held by thread. It also might make sense to put together some sort of performance load test to see if we can make the problem easier to replicate? Let me know your thoughts... Cheers Dan On 14 May 2015 at 16:22, Nacho Cánovas Rejón n.cano...@gesconsultor.com wrote: Hi everybody. There is some time since my last message..., but I'm been following all your advances reading from mail and talking to Óscar and congratulations for your work. I'm having a problem with sessions since I updated to DataNucleus 4, and I did some research looking for the problem. This is the exception:
Re: Running Isis on Jetty with PostgreSQL
Hi Sebastian. Please use the schema property of the @PersistenceCapable annotation as detailed in [1]. [1] https://isis.apache.org/guides/rg.html#_rg_annotations_manpage-PersistenceCapable El 7/7/2015, a las 1:20, Sebastian Sobiech sebastian.sobi...@gmail.com escribió: Hi Oscar, I gave maximum permissions on the db to the user. Isis created the 'simple' schema in my local db and it's writing data there. I need to use a different schema. I followed the pet-clinic tutorial and changed the schema in the entity class, but isis is constantly using 'simple' schema. Do you happen to know what am I missing? Best regards, Sebastian W dniu 2015-07-07 o 00:15, GESCONSULTOR pisze: Hi Sebastian and welcome to the mailing list. My team has been using Isis on PostgreSQL extensively for the last years and it runs smoothly. On this SNAPSHOT there are new features regarding schemes. Seems that Isis is trying to create a table on the scheme named Simple. Has the user specified on the connection enough permissions for creating schemes ? Can you manually create that scheme and run the app again, once the scheme exists, and DataNucleus can automatically create tables on it? HTH, Oscar El 6/7/2015, a las 21:10, Sebastian Sobiech sebastian.sobi...@gmail.com escribió: Hello, I'm trying to see if our team can use Apache Isis for our project. Our goal is to use it on our PostgreSQL database and run it on Jetty for development purposes. I am in charge of investigating this framework. I have encountered big problems with running the sampleapp from isis-master repo. I use IntellJ IDEA 14.x with JDK 1.8. I run it from the webapp directory with jetty:run command. No matter if I use the HSQLDB or PostgreSQL I always receive this error: javax.servlet.ServletException: com.google.inject.ProvisionException: Guice provision errors:||1) Error in custom provider, org.datanucleus.exceptions.NucleusDataStoreException: An exception was thrown while adding/validating class(es) : invalid schema name: SIMPLE in statement [CREATE TABLE simple.SimpleObject|(|id BIGINT GENERATED BY DEFAULT AS IDENTITY,|name NVARCHAR(40) NOT NULL,|version BIGINT NOT NULL,|CONSTRAINT SimpleObject_PK PRIMARY KEY (id)|)]|java.sql.SQLException: invalid schema name: SIMPLE in statement [CREATE TABLE simple.SimpleObject|(|id BIGINT GENERATED BY DEFAULT AS IDENTITY,|name NVARCHAR(40) NOT NULL,|version BIGINT NOT NULL,|CONSTRAINT SimpleObject_PK PRIMARY KEY (id)|)]|?at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)|?at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)|?at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)|?at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source)|?at org.datanucleus.store.rdbms.datasource.dbcp.DelegatingStatement.execute(DelegatingStatement.java:246)|?at org.datanucleus.store.rdbms.datasource.dbcp.DelegatingStatement.execute(DelegatingStatement.java:246)|?at org.datanucleus.store.rdbms.table.AbstractTable.executeDdlStatement(AbstractTable.java:864)|?at org.datanucleus.store.rdbms.table.AbstractTable.executeDdlStatementList(AbstractTable.java:815)|?at org.datanucleus.store.rdbms.table.AbstractTable.create(AbstractTable.java:531)|?at org.datanucleus.store.rdbms.table.AbstractTable.exists(AbstractTable.java:594)|?at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:3355)|?at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2871)|?at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)|?at org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3838)|?at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:143)|?at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponents.java:122)|?at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.init(DataNucleusApplicationComponents.java:104)|?at
Re: Running Isis on Jetty with PostgreSQL
Hi Sebastian and welcome to the mailing list. My team has been using Isis on PostgreSQL extensively for the last years and it runs smoothly. On this SNAPSHOT there are new features regarding schemes. Seems that Isis is trying to create a table on the scheme named Simple. Has the user specified on the connection enough permissions for creating schemes ? Can you manually create that scheme and run the app again, once the scheme exists, and DataNucleus can automatically create tables on it? HTH, Oscar El 6/7/2015, a las 21:10, Sebastian Sobiech sebastian.sobi...@gmail.com escribió: Hello, I'm trying to see if our team can use Apache Isis for our project. Our goal is to use it on our PostgreSQL database and run it on Jetty for development purposes. I am in charge of investigating this framework. I have encountered big problems with running the sampleapp from isis-master repo. I use IntellJ IDEA 14.x with JDK 1.8. I run it from the webapp directory with jetty:run command. No matter if I use the HSQLDB or PostgreSQL I always receive this error: javax.servlet.ServletException: com.google.inject.ProvisionException: Guice provision errors:||1) Error in custom provider, org.datanucleus.exceptions.NucleusDataStoreException: An exception was thrown while adding/validating class(es) : invalid schema name: SIMPLE in statement [CREATE TABLE simple.SimpleObject|(|id BIGINT GENERATED BY DEFAULT AS IDENTITY,|name NVARCHAR(40) NOT NULL,|version BIGINT NOT NULL,| CONSTRAINT SimpleObject_PK PRIMARY KEY (id)|)]|java.sql.SQLException: invalid schema name: SIMPLE in statement [CREATE TABLE simple.SimpleObject|(|id BIGINT GENERATED BY DEFAULT AS IDENTITY,| name NVARCHAR(40) NOT NULL,|version BIGINT NOT NULL,|CONSTRAINT SimpleObject_PK PRIMARY KEY (id)|)]|?at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)|?at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)|?at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)|?at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source)|?at org.datanucleus.store.rdbms.datasource.dbcp.DelegatingStatement.execute(DelegatingStatement.java:246)|?at org.datanucleus.store.rdbms.datasource.dbcp.DelegatingStatement.execute(DelegatingStatement.java:246)|?at org.datanucleus.store.rdbms.table.AbstractTable.executeDdlStatement(AbstractTable.java:864)|?at org.datanucleus.store.rdbms.table.AbstractTable.executeDdlStatementList(AbstractTable.java:815)|?at org.datanucleus.store.rdbms.table.AbstractTable.create(AbstractTable.java:531)|?at org.datanucleus.store.rdbms.table.AbstractTable.exists(AbstractTable.java:594)|?at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:3355)|?at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2871)|?at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)|?at org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3838)|?at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:143)|?at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponents.java:122)|?at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.init(DataNucleusApplicationComponents.java:104)|?at
Re: Autocomplete for an a
Hi Miguel. You can uses conditional choices for that use case. Please, see [1]. Un saludo: Oscar [1] http://isis.apache.org/guides/rg.html#2.1.3.-choices%0B() El 3/7/2015, a las 4:23, Miguel Payet mpa...@fastmail.fm escribió: Hello all, I wonder if there is a way to make autocomplete choices for an action parameter dependent on the value of another parameter. In this case, I would like that the user select a client in the first parameter, and then only the selected client's cases be shown in the second parameter. @ActionLayout(named = Client report by case) public Blob clientReportByCase( @Parameter(optionality = Optionality.MANDATORY) @ParameterLayout(named = Client) final Client client, @Parameter(optionality = Optionality.MANDATORY) @ParameterLayout(named = Caso) final String case) { ... } Thanks! Miguel
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
(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:104) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:65) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75) at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024) at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:60) If try to use them inside a SudoService.sudo(…) call I don’t have access to the “executionContext” (it’s private). So basically, I would need to make the “executionContext” field of FixtureScript “public”, or being able to use SudoService to override the User globally, without needing to use a “Callable” construct. Do you agree? Thanks, Oscar El 18/4/2015, a las 12:35, GESCONSULTOR o@gesconsultor.com escribió: Many thanks, Dan. I'll try it! El 18/4/2015, a las 12:26, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, I hit this same issue a couple of weeks ago while refactoring our example todoapp, which led me to inventing the SudoService. Not yet documented, but you can see its usage here [1] HTH Dan [1] https://github.com/isisaddons/isis-app-todoapp/blob/master/fixture/src/main/java/todoapp/fixture/module/todoitem/ToDoItemCreate.java#L134 On 18 April 2015 at 10:17, QUALITEC - Óscar Bou o...@qualitec.es wrote: Hi all. I have a FixtureScript that invokes some factory methods that include setters that are invoking by wrapping the domain object (for ensuring that the validateXXX, modifyXXX, etc. methods are also invoked). public class TwentyPercentForTwoOrdersCoupon extends FixtureScript { @Override protected void execute( final FixtureScript.ExecutionContext executionContext) { this.coupons.createCoupon(50€-2ORDERS, LocalDate.now(), LocalDate.now().plusDays(3), 2L, null, new BigDecimal(50)); } @Inject private Coupons coupons; } @DomainService(repositoryFor = Coupon.class) public class Coupons extends AbstractTellmegenService { // {{ createCoupon (action) @MemberOrder(sequence = 2.5.1) public Coupon createCoupon(@ParameterLayout(named = Code) final String code, @ParameterLayout(named = Start Date) final LocalDate startDate, @ParameterLayout(named = Due Date) final LocalDate dueDate, @ParameterLayout(named = Max Number of Kits) final Long maxNumberOfKits, @ParameterLayout(named = Percent Discount (0-100)) @Parameter(optionality = Optionality.OPTIONAL) final Integer percentDiscount, @ParameterLayout(named = Amount Discount (€)) @Parameter(optionality = Optionality.OPTIONAL) final BigDecimal amountDiscount) { final Coupon coupon = this.newTransientInstance(Coupon.class); this.wrap(coupon).setCode(code); this.wrap(coupon).setStartDate(startDate); this.wrap(coupon).setDueDate(dueDate); this.wrap(coupon).setMaxNumberOfOrders(maxNumberOfKits); this.wrap(coupon).setPercentDiscount(percentDiscount); this.wrap(coupon).setAmountDiscount(amountDiscount); // Save DB this.persist(coupon); this.getContainer().flush(); return coupon; } But when executing from the Fixture Script, the following exception is thrown. Any ideas about how to avoid it? I'm using the security add-on. Perhaps it must be initialized somewhere on the Fixture Script? Thanks! 11:06:11,379 [WebAppContextmain WARN ] Failed startup of context o.e.j.w.WebAppContext{,file:/Users/oscarboubou/dev/tellmegen/dbtg/webapp/src/main/webapp/},src/main/webapp javax.servlet.ServletException: com.google.inject.ProvisionException: Guice provision errors: 1) Error in custom provider
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.
Re: Fixture Scripts - Invoking WrapperFactory.wrap() in actions
Many thanks, Dan. I'll try it! El 18/4/2015, a las 12:26, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, I hit this same issue a couple of weeks ago while refactoring our example todoapp, which led me to inventing the SudoService. Not yet documented, but you can see its usage here [1] HTH Dan [1] https://github.com/isisaddons/isis-app-todoapp/blob/master/fixture/src/main/java/todoapp/fixture/module/todoitem/ToDoItemCreate.java#L134 On 18 April 2015 at 10:17, QUALITEC - Óscar Bou o...@qualitec.es wrote: Hi all. I have a FixtureScript that invokes some factory methods that include setters that are invoking by wrapping the domain object (for ensuring that the validateXXX, modifyXXX, etc. methods are also invoked). public class TwentyPercentForTwoOrdersCoupon extends FixtureScript { @Override protected void execute( final FixtureScript.ExecutionContext executionContext) { this.coupons.createCoupon(50€-2ORDERS, LocalDate.now(), LocalDate.now().plusDays(3), 2L, null, new BigDecimal(50)); } @Inject private Coupons coupons; } @DomainService(repositoryFor = Coupon.class) public class Coupons extends AbstractTellmegenService { // {{ createCoupon (action) @MemberOrder(sequence = 2.5.1) public Coupon createCoupon(@ParameterLayout(named = Code) final String code, @ParameterLayout(named = Start Date) final LocalDate startDate, @ParameterLayout(named = Due Date) final LocalDate dueDate, @ParameterLayout(named = Max Number of Kits) final Long maxNumberOfKits, @ParameterLayout(named = Percent Discount (0-100)) @Parameter(optionality = Optionality.OPTIONAL) final Integer percentDiscount, @ParameterLayout(named = Amount Discount (€)) @Parameter(optionality = Optionality.OPTIONAL) final BigDecimal amountDiscount) { final Coupon coupon = this.newTransientInstance(Coupon.class); this.wrap(coupon).setCode(code); this.wrap(coupon).setStartDate(startDate); this.wrap(coupon).setDueDate(dueDate); this.wrap(coupon).setMaxNumberOfOrders(maxNumberOfKits); this.wrap(coupon).setPercentDiscount(percentDiscount); this.wrap(coupon).setAmountDiscount(amountDiscount); // Save DB this.persist(coupon); this.getContainer().flush(); return coupon; } But when executing from the Fixture Script, the following exception is thrown. Any ideas about how to avoid it? I'm using the security add-on. Perhaps it must be initialized somewhere on the Fixture Script? Thanks! 11:06:11,379 [WebAppContextmain WARN ] Failed startup of context o.e.j.w.WebAppContext{,file:/Users/oscarboubou/dev/tellmegen/dbtg/webapp/src/main/webapp/},src/main/webapp javax.servlet.ServletException: com.google.inject.ProvisionException: Guice provision errors: 1) Error in custom provider, org.apache.isis.applib.services.wrapper.HiddenException: Reason: Could not locate application user for initialisation. Identifier: com.tellmegen.domain.model.order.coupon.Coupon#code() at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132) at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132) while locating org.apache.isis.core.runtime.system.IsisSystem for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:1) while locating webapp.application.TellMeGenApplication 1 error at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:450) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:351) at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:118) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.apache.isis.core.webserver.WebServerBootstrapper.bootstrap(WebServerBootstrapper.java:86) at org.apache.isis.core.webserver.WebServer.run(WebServer.java:107) at
Re: Any objections to me merging in ISIS-789 (the DataNucleus 4 stuff) to master?
Nice idea... El 16/4/2015, a las 21:06, Martin Grigorov mgrigo...@apache.org escribió: Hi Dan, Let's create a tag, e.g. pre-DN4 from current master. This way everyone who faces any problem with DN4 and has no time/resources to investigate the problems immediately will have the option to use this version of ISIS until has more time/resources. Martin Grigorov Freelancer, available for hire! Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Apr 16, 2015 at 9:45 PM, Dan Haywood d...@haywood-associates.co.uk wrote: Hi folks For those running off -SNAPSHOT, this will impact you: *I'd like to merge in ISIS-789, the DataNucleus 4 stuff to master.* If you are running against -SNAPSHOT, it will require some minor updates to existing pom.xml files. (I intend to prepare an update doc on the website; will be in the 1.9.0 release notes). More importantly, though, this is a major upgrade of DN4 and, so, should be considered as quite high risk. I recommend that it is kept away from production for a little while, at least. If you are using -SNAPSHOT in production, my recommendation is that you can create a stable branch for yourself and build from that. ~~~ Let me know ... will assume silent consensus. Thx Dan
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: changing order of collection items
Hi Erick. Simply by implementing the Comparable interface. HTH, Oscar El 17/3/2015, a las 16:43, Erik de Hair e.deh...@pocos.nl escribió: Hi, Anybody a great idea for changing item order in a sorted set using the wicket viewer? I have a rank-property in the database but how to easily manage the item order (move item(s) up/down single or multiple places)... Thanks, Erik
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...
their ongoing identity (in essence corresponding to the external system's URI for that entity), but that's an implementation detail. @ViewModelLayout and @DomainObjectLayout are basically identical. The above proposal does NOT include the introduction of @DomainEntity. ~~~ Opinions? I'm kinda hoping this will get us to some sort of consensus ... Thanks Dan [1] http://isis.markmail.org/thread/ng22jsmxeq55ewny [2] https://issues.apache.org/jira/browse/ISIS-970 [3] https://github.com/apache/isis/blob/a5b728f0606fa12c254ca1a0ecd49b88b816d6df/example/application/simpleapp/dom/pom.xml#L136 On 3 January 2015 at 11:23, David Tildesley davo...@yahoo.co.nz wrote: Hi Oscar, Seems to me it's the same thing: Let me add some clarity to that DDD example you shared: Port --- Domain Model ---Adapter is just a different set of terms for the same layers: User Interface -- Problem Domain --- System Interface Chaining applications together in an integration you get Adapter A of AppA calling Port B of AppB and so on - which I am guessing is what you meant by Inter Domain. Clearly ViewModel fits into Port quite nicely. In fact it's the only place it belongs. But Intra Domain? Does ISIS in some way prevent a domain object calling another domain object's operation directly? Anyway I suspect that's a separate discussion. The bottom line is that we can't stop people bleeding domain model behaviour out into viewmodels, however what we can do is to make it as clear and unambiguous as possible by avoiding/reducing overloading of terms/concepts and suggesting the correct approach to building an application. My single piece of advice to folk: If you want to avoid a disaster then make sure you model your problem domain in a just enough consensus modelling exercise before your team goes anywhere near View Models or any other part of the UI layer. ISIS offers nothing new that would change this advice. However View Models could be the scaffolding that you end up hanging yourself and your team on if you don't understand that they are not part of your domain model. I guess I should shut up now as I am just repeating myself. In summary: Big Tick for the addition of: @DomainObject (External) so that we don't have to misuse @ViewModel Regards,David. On Saturday, 3 January 2015 10:24 PM, GESCONSULTOR o@gesconsultor.com wrote: Hi David! What it's clear is that properties/collections can be useful not only for domain layer objects, so the @Domain prefix should not be added. Regarding the Application Layer, I agree that sometimes it can be a clear indication of an anemic domain. But properly implemented and used, it's well accepted on the DDD community as a way to create a layer over domain entities for orchestrating them. They're useful for representing Domain Entities the way is most useful for the end-user as perhaps the Domain Entities have been designed from another perpective different from that concrete use case. There are some examples on the latest book, Implementing DDD by Caughn Vernon. That use case is really similar to the most common use in Apache ISIS, with the advantage that the UI is automatically generated from it Anyway I don't advocate for using ViewModels only for the Application Layer, but in all case where views can be useful, including intra-domain or inter-domain use cases (for example, for modeling the integration patterns described on the Implementing DDD book such as Ports and Adapters. as an example sure you will find interesting this sole implementation made by Vernon, and how they could be implementing by Apache Isis[1]. So yes, as you said we must be careful with anemic domains :)) Regards, Oscar [1] https://github.com/VaughnVernon/IDDD_Samples/tree/master/iddd_collaboration/src/main/java/com/saasovation/collaboration El 1/1/2015, a las 20:45, David Tildesley davo...@yahoo.co.nz escribió: Hi Oscar, I think we may be looking at the tail wagging the dog in this part of the thread. I.e. the reason why Jeroen has found ViewModels for some of the scenarios he outlined (e.g. External Entity service integration) so useful was because there was no alternative available to him. This is where Option 1 tidies things up from a conceptual layer point of view, as discussed earlier in the post, but doesn't in any way prevent you from doing what you suggest below if that is what you believe is correct i.e. there would nothing forcing you to use @ DomainObject (External) - you could instead carry on using @ViewModel within your domain layer if that is what you think is correct. For those of us that believe this is conceptually wrong, Option 1 keeps us happy because now we have @ DomainObject (External) available to us and furthermore, it allows @DomainObject (External) to evolve independently of @ViewModel sometime in the future. i.e. Option 1 removes the layer overloading
Re: Showing action results as tabs attached to entity pages
Many thanks, Dan. El 3/1/2015, a las 16:39, Dan Haywood d...@haywood-associates.co.uk escribió: I've raised * ISIS-993 [1] - for splitting out object into multiple tabs and * ISIS-994 [2] - contributed properties that return a URL should be shown inline within an iframe. [1] https://issues.apache.org/jira/browse/ISIS-993 [2] https://issues.apache.org/jira/browse/ISIS-994 On 13 December 2014 at 17:32, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: 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
Re: ISIS-970 ... (new annotations) please review if you get a chance...
Good consensus for me also :) El 3/1/2015, a las 18:48, Branham, Jeremy [HR] jeremy.d.bran...@sprint.com escribió: This is a good compromise IMHO. Jeremy D. Branham Tel: **DOTNET -Original Message- From: Dan Haywood [mailto:d...@haywood-associates.co.uk] Sent: Saturday, January 03, 2015 7:27 AM To: users Cc: d...@isis.apache.org Subject: Re: ISIS-970 ... (new annotations) please review if you get a chance... On 3 January 2015 at 13:14, Jeroen van der Wal jer...@stromboli.it wrote: I have one more thought: since @ViewModel and @DomainObject(nature=UI_VIEW) are the same concepts it might be more intuitive to use @DomainObject(nature=VIEW_MODEL) Yes, that probably does make sense; we are just providing two equivalent syntaxes for describing a (UI) view model. So the revised proposal is: for the UI/app layer, retain/introduce: * @ViewModel * @ViewModelLayout for the domain layer: * @DomainObject(nature=JDO_ENTITY | EXTERNAL_ENTITY | VIEW_MODEL) * @DomainObjectLayout for both: * @Property(domainEvent=..., ) and @PropertyLayout * @Collection(domainEvent=..., ) and @CollectionLayout * @Action(domainEvent=..., ) and @ActionLayout * @Parameter and @ParameterLayout where @ViewModel and @DomainObject(nature=VIEW_MODEL) are basically equivalent; choose whichever notation you prefer (and use a metamodel validator to exclude the other). thx Dan 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.
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: New page describing how to manage top-level menu bars (1.8.0-SNAPSHOT)
It's impressive. Nice to see what good domain design and some handful notations can achieve :) Really useful the 3 zones. Thanks, Oscar El 12/12/2014, a las 10:24, Dan Haywood d...@haywood-associates.co.uk escribió: With the new @DomainServiceLayout annotation, things are, I think, relatively straightforward and quite flexible. But judge for yourself [1] Cheers Dan [1] http://isis.apache.org/components/viewers/wicket/application-menu-layout.html
Showing an external URL embedded in the webapp
Is it possible for an action to return a URL and show it inside the webapp at full size (except menus)? How could it be achieved with the new design/annotations? That way we could easily integrate with other pages, web apps (reporting, dashboards, ...). Thanks, Oscar
Re: Showing an external URL embedded in the webapp
I'm trying to think about what we would need in ISIS to implement things we customized in our app. In order to fulfill all requirements there are parts of the app that are directly implemented by means of external webapps (like reporting and dashboards) working all together using CAS as an authentication service and having similar CSS. So the user has a unified user experience, despite is implemented as something like a composite application. In that case, supposing the main page container would the ISIS webapp, we would need to reference different URLs from menus that redirect to the external module. And it should be showed inside ISIS maximized. Internally we are using iFrames as Martin suggests in most cases (tere are other parts that need to access the main app context; in those cases I undertand that should be implemented as a specialized Component Factory). So from ISIS perspective, I think that simply the reqs Dan mentioned would be enough. Thanks, Oscar El 12/12/2014, a las 12:53, Martin Grigorov mgrigo...@apache.org escribió: Yes, It has to be in iframe because otherwise the CSS from Isis most probably will mess up the one from the external page. And there won't be a need to cut the external page's htmlhead part. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Dec 12, 2014 at 1:44 PM, Dan Haywood d...@haywood-associates.co.uk wrote: Currently returning a URL will open the object in a new window. I think the way to support this requirement is to write a new Wicket ComponentFactory implementation for something like an iFrame, and then have a bit of additional metadata (probably in @ActionLayout since it pertains to the UI) which would act as a hint to this IFrame factory. Don't think this would be too difficult to implement; just not done yet. If you have an exact requirement, perhaps we could use that to drive forward the design? Cheers Dan On 12 December 2014 at 11:27, GESCONSULTOR o@gesconsultor.com wrote: Is it possible for an action to return a URL and show it inside the webapp at full size (except menus)? How could it be achieved with the new design/annotations? That way we could easily integrate with other pages, web apps (reporting, dashboards, ...). Thanks, Oscar
Re: Showing action results as tabs attached to entity pages
To clarify this, it's complementary to current implementation. Perhaps a hint on the action's annotation to show its full form Ina tab instead of as a property (with the corresponding link)? El 12/12/2014, a las 14:15, GESCONSULTOR o@gesconsultor.com escribió: Hi dan. I Remember hen you implemented contributions that I thought it was really similar (in fact, more powerful). I've used it also in our domain, and works wonderfully. The point here is that the returning entity, instead of being showed as a property with a link to open it, is fully opened as an attached tab. That way we,be found is more intuitive for the user, as it naturally looks at all tabs, containing each one information related to the main entity, coming from different BCs. HTH, Oscar El 12/12/2014, a las 13:54, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, this sounds like contributed properties and collections... something already implemented? The only difference is that we don't have put the contributions in separate tabs; they are indistinguishable from regular properties/collections. For example, in the todo app the relative priority property is contributed, as is the similar items collection. Basically these are actions on services that take a single ToDoItem and return either a single object (= contributed property) or a list of objects (= contributed collection). With respect to the validator, the usual hideXxx, disableXxx rules apply. Note that contributed properties can't be updated; but (in Estatio at least) we only now update using actions. Have I understand you correctly? Cheers Dan On 12 December 2014 at 12:20, GESCONSULTOR o@gesconsultor.com wrote: There is other Important UI hint we implemented, perhaps useful from the DCI perspective, regarding showing as attached tabs to one entity's form, information returned from another action (from URLs like this case, other entity extending on other DDD module this one - for example, think of another module holding information generating ToDoItems when a Task -different Entity- is created. And we don't want to create a dependency on the ToDoItem module. In that case we want, when the user accesses the ToDoItem page, to show the Task attached to it. For that we have an annotation on the action, indicating that the resulting object must be showed as an attached tab (or any other similar way) when showing entities of the specified class passed as an annotation field. As an improvement, Per-entity a validation could be done (by means of a validator class that receives the concrete entity showing, in order to decide if for that concrete instance it can be showed (or perhaps not showing if it's returning null). I don't have here my laptop but can provide an example tomorrow. thanks, Oscar
Re: Showing action results as tabs attached to entity pages
I think that current bookmarks place in the new viewer (at least for me) fulfills their role. But I really miss them for entities ... :(( 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 as tabs... each opened object is shown on a separate tab (like tabs in a browser, I suppose). Separating out a single entity into multiple tabs would then result in tabs within tabs, which might be confusing. Thoughts? Dan On 12 December 2014 at 13:15, GESCONSULTOR o@gesconsultor.com wrote: Hi dan. I Remember hen you implemented contributions that I thought it was really similar (in fact, more powerful). I've used it also in our domain, and works wonderfully. The point here is that the returning entity, instead of being showed as a property with a link to open it, is fully opened as an attached tab. That way we,be found is more intuitive for the user, as it naturally looks at all tabs, containing each one information related to the main entity, coming from different BCs. HTH, Oscar El 12/12/2014, a las 13:54, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, this sounds like contributed properties and collections... something already implemented? The only difference is that we don't have put the contributions in separate tabs; they are indistinguishable from regular properties/collections. For example, in the todo app the relative priority property is contributed, as is the similar items collection. Basically these are actions on services that take a single ToDoItem and return either a single object (= contributed property) or a list of objects (= contributed collection). With respect to the validator, the usual hideXxx, disableXxx rules apply. Note that contributed properties can't be updated; but (in Estatio at least) we only now update using actions. Have I understand you correctly? Cheers Dan On 12 December 2014 at 12:20, GESCONSULTOR o@gesconsultor.com wrote: There is other Important UI hint we implemented, perhaps useful from the DCI perspective, regarding showing as attached tabs to one entity's form, information returned from another action (from URLs like this case, other entity extending on other DDD module this one - for example, think of another module holding information generating ToDoItems when a Task -different Entity- is created. And we don't want to create a dependency on the ToDoItem module. In that case we want, when the user accesses the ToDoItem page, to show the Task attached to it. For that we have an annotation on the action, indicating that the resulting object must be showed as an attached tab (or any other similar way) when showing entities of the specified class passed as an annotation field. As an improvement, Per-entity a validation could be done (by means of a validator class that receives the concrete entity showing, in order to decide if for that concrete instance it can be showed (or perhaps not showing if it's returning null). I don't have here my laptop but can provide an example tomorrow. thanks, Oscar
Re: Showing action results as tabs attached to entity pages
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 as tabs... each opened object is shown on a separate tab (like tabs in a browser, I suppose). Separating out a single entity into multiple tabs would then result in tabs within tabs, which might be confusing. Thoughts? Dan On 12 December 2014 at 13:15, GESCONSULTOR o@gesconsultor.com wrote: Hi dan. I Remember hen you implemented contributions that I thought it was really similar (in fact, more powerful). I've used it also in our domain, and works wonderfully. The point here is that the returning entity, instead of being showed as a property with a link to open it, is fully opened as an attached tab. That way we,be found is more intuitive for the user, as it naturally looks at all tabs, containing each one information related to the main entity, coming from different BCs. HTH, Oscar El 12/12/2014, a las 13:54, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, this sounds like contributed properties and collections... something already implemented? The only difference is that we don't have put the contributions in separate tabs; they are indistinguishable from regular properties/collections. For example, in the todo app the relative priority property is contributed, as is the similar items collection. Basically these are actions on services that take a single ToDoItem and return either a single object (= contributed property) or a list of objects (= contributed collection). With respect to the validator, the usual hideXxx, disableXxx rules apply. Note that contributed properties can't be updated; but (in Estatio at least) we only now update using actions. Have I understand you correctly? Cheers Dan On 12 December 2014 at 12:20, GESCONSULTOR o@gesconsultor.com wrote: There is other Important UI hint we implemented, perhaps useful from the DCI perspective, regarding showing as attached tabs to one entity's form, information returned from another action (from URLs like this case, other entity extending on other DDD module this one - for example, think of another module holding information generating ToDoItems when a Task -different Entity- is created. And we don't want to create a dependency on the ToDoItem module. In that case we want, when the user accesses the ToDoItem page, to show the Task attached to it. For that we have an annotation on the action, indicating that the resulting object must be showed as an attached tab (or any other similar way) when showing entities of the specified class passed as an annotation field. As an improvement, Per-entity a validation could be done (by means of a validator class that receives the concrete entity showing, in order to decide if for that concrete instance it can be showed (or perhaps not showing if it's returning null). I don't have here my laptop but can provide an example tomorrow. thanks, Oscar
Re: Showing action results as tabs attached to entity pages
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 as tabs... each opened object is shown on a separate tab (like tabs in a browser, I suppose). Separating out a single entity into multiple tabs would then result in tabs within tabs, which might be confusing. Thoughts? Dan On 12 December 2014 at 13:15, GESCONSULTOR o@gesconsultor.com wrote: Hi dan. I Remember hen you implemented contributions that I thought it was really similar (in fact, more powerful). I've used it also in our domain, and works wonderfully. The point here is that the returning entity, instead of being showed as a property with a link to open it, is fully opened as an attached tab. That way we,be found is more intuitive for the user, as it naturally looks at all tabs, containing each one information related to the main entity, coming from different BCs. HTH, Oscar El 12/12/2014, a las 13:54, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, this sounds like contributed properties and collections... something already implemented? The only difference is that we don't have put the contributions in separate tabs; they are indistinguishable from regular properties/collections. For example, in the todo app the relative priority property is contributed, as is the similar items collection. Basically these are actions on services that take a single ToDoItem and return either a single object (= contributed property) or a list of objects (= contributed collection). With respect to the validator, the usual hideXxx, disableXxx rules apply. Note that contributed properties can't be updated; but (in Estatio at least) we only now update using actions. Have I understand you correctly? Cheers Dan On 12 December 2014 at 12:20, GESCONSULTOR o@gesconsultor.com wrote: There is other Important UI hint we implemented, perhaps useful from the DCI perspective, regarding showing as attached tabs to one entity's form, information returned from another action (from URLs like this case, other entity extending on other DDD module this one - for example, think of another module holding information generating ToDoItems when a Task -different Entity- is created. And we don't want to create a dependency on the ToDoItem module. In that case we want, when the user accesses the ToDoItem page, to show the Task attached to it. For that we have an annotation on the action, indicating that the resulting object must be showed as an attached tab (or any other similar way) when showing entities of the specified class passed as an annotation field. As an improvement, Per-entity a validation could be done (by means of a validator class that receives the concrete entity showing, in order to decide if for that concrete instance it can be showed (or perhaps not showing if it's returning null). I don't have here my laptop but can provide an example tomorrow. thanks, Oscar
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
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.
Re: Isis Security Addon Custom ApplicationUser
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 screenshots in the README are still of 1.7.0) On Wed, Nov 19, 2014 at 4:33 PM, Jeroen van der Wal wrote: Hi Martin, I would advice against option 2 because you lose an easy update path to newer versions of the security module. +1 to that advice. Tell us more about your use-case so we can see what the options are. In particular, is the additional information you need to store mandatory with no sensible default (ie would need to prompt for it), or would the current signatures of the methods in ApplicationUsers domain service suffice? Cheers, Jeroen On Wed, Nov 19, 2014 at 2:24 PM, Martin Balmaceda martin.balmac...@gmail.com wrote: -- to do is to be. dobedobedo -- to do is to be. dobedobedo
Re: Casting in bi-directional relationships?
Hi Johan. One solution would be to have an abstract base class for all those concrete implementations that contains the mappedBy field/property and common logic, assuming the possible concrete classes are limited and does not have other (not-common) descendants. We've implemented like that many times. Another option would be an m-n relationship or a 1-n relationship with a join table (see on the ISIS Eclipse templates those starting with isjdc). HTH, Oscar El 20/11/2014, a las 7:49, johandoornen...@filternet.nl escribió: I have a general object Assessment that I would like to apply to 'targets' of many different Types in the application. In order to be as generic as possible I have set the class of the target of the Assessment to 'Object' (private Object target;) Now if I make a collection on an other object that takes Assessments using @Persistent(mappedBy = target, dependentElement = true) JDO cannot map to target. Anybody has a suggestion?
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: Ideas on how to use the EventBus for validation.
Agree with you, Dan. Simply the @ActionInteraction perhaps should have the @PostsXXX prefix for coherence. Many thanks!! El 03/07/2014, a las 12:25, Dan Haywood d...@haywood-associates.co.uk escribió: @ActionInteraction
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: [ANN] Apache Isis version 1.5.0 and related components Released
Really nice way to celebrate the success of the first IsisCon !!! This development platform has a great potential for the years to come. It's been fantastic to share experiences and the roadmap promises a brilliant future. To all mail list readers, we count with you for the next IsisCon !!! Cheers! El 07/06/2014, a las 20:14, Dan Haywood d...@haywood-associates.co.uk escribió: The Isis team is pleased to announce the release of: - Apache Isis Core version 1.5.0 - Wicket Viewer 1.5.0 - Restful Objects Viewer 2.3.0 - JDO Object Store 1.5.0 - Shiro Security 1.5.0 - Simple Archetype 1.5.0 - Quickstart Archetype 1.5.0 New features and improvements in this release include: - Additional EventBus service events, ability to programmatically trigger events, vetoing subscribers (ISIS-550, ISIS-786) - Integration testing improvements, most notably the new FixtureScript API and auto-injection of services into integration tests (ISIS-776, ISIS-782, ISIS-783) - Better handling of multiple realms in Shiro security (ISIS-746) - Better default column sizes for applib services (command, auditing, pubsub) (ISIS-744, ISIS-750) - Precommit phase to flush pending updates for applib services (ISIS-769) - Preparatory work for move to Java 7 (ISIS-569, ISIS-770, ISIS-772) - Improved support for JRebel in Maven and various IDEs (ISIS-756) Notable bug fixes include: - Fixed blob/clob mapping in JDO Objectstore (ISIS-714) - Fixed handling of mandatory boolean parameters in Wicket viewer (ISIS-431) - RO not threadsafe when buiding metamodel (ISIS-777) Full release notes are available at [1,2,3,4,5,6,7] on the Isis website. You can access this release directly from the Maven central repo [8], or download the release and build it from source [9]. Enjoy! -The Isis team [1] http://isis.apache.org/core/release-notes/isis-1.5.0.html [2] http://isis.apache.org/components/viewers/wicket/release-notes/isis-viewer-wicket-1.5.0.html [3] http://isis.apache.org/components/viewers/restfulobjects/release-notes/isis-viewer-restfulobjects-2.3.0.html [4] http://isis.apache.org/components/objectstores/jdo/release-notes/isis-objectstore-jdo-1.5.0.html [5] http://isis.apache.org/components/security/shiro/release-notes/isis-security-shiro-1.5.0.html [6] http://isis.apache.org/getting-started/release-notes/quickstart_wrj-archetype-1.5.0.html [7] http://isis.apache.org/getting-started/release-notes/simple_wrj-archetype-1.5.0.html [8] http://search.maven.org [9] http://isis.apache.org/download.html
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)
I saw on your commits a wrapNoExecute(...) or similarly named method. It would ok. Not sure what you mean by an annotation El 07/05/2014, a las 22:14, Dan Haywood d...@haywood-associates.co.uk escribió: On 7 May 2014 08:53, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Hi, Dan. It makes all sense, but the problem we've found is when the property is @Hidden or @Disabled. In those cases, calling this.wrap(domainObject).setXXX throws an exception. If we had business logic implemented inside the modifyXXX method, the only way for it to be executed if the property was disabled was to directly call this.domainObject.modifyXXX, in order to avoid the Isis exception. In working on ISIS-550 (event bus), I encountered the same issue. If you've looked at the code in the ISIS-550 branch that I pushed this morning, you'll see that my solution there was to introduce a wrappedPolicy on the PostsXxxEvent annotations, as a hint to the wrapper to not enforce the business rule checks. But from what you've just said, perhaps it'd be better to promote this to a full-blown annotation in its own right? Or, perhaps even better again, maybe wrap(...) should simply be overloaded to return either a wrapper that performs business rule checks, or a wrapper that doesn't? Thoughts welcome Dan In the test I've seen that the exception was expected, without the object being wrapped? That was confusing me... @Test 77 public void cannotUseModify() throws Exception { 78 79 expectedExceptions.expectMessage(Cannot invoke supporting method for 'Description'; use only property accessor/mutator); 80 81 // given 82 assertThat(toDoItem.getDescription(), is(Buy bread)); 83 84 // when 85 toDoItem.modifyDescription(Buy bread and butter); 86 87 // then 88 assertThat(toDoItem.getDescription(), is(Buy bread)); 89 } El 07/05/2014, a las 00:09, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, I don't think I explained myself well enough. If the domain object has modifyXxx() and setXxx(), then calling: this.wrap(domainObject).setXXX(...); will in fact cause the modifyXxx() method to be called rather than the setXxx() one. That is, the proxy looks for the PropertySetterFacet, and invokes it. When there's a modifyXxx() and a setXxx(), it finds the PropertySetterFacetViaModifyMethod. The idea is that the set represents the essence of the interaction (I want to set a property of this object); the fact that it translates to calling the modifyXxx method is (in a sense) internal to the contract between the framework and the pojo. ~~~ Thus: if you are calling modifyXxx anywhere, you just need to change to call setXxx instead. Hope that makes sense? Dan On 6 May 2014 10:45, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: 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
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: DomainObjectContainer in Junits
Hi Ranganath. Seems that you need to define integration tests. You can find documentation abou Isis support on [1]. If you prefer, BDD style tests are also supported. see [2]. Also there are examples on the Isis QuickStart project [3]. [1] http://isis.apache.org/core/integtestsupport.html [2] https://isis.apache.org/core/specsupport-and-integtestsupport.html [3] https://github.com/apache/isis/tree/master/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests Don't hesitate to contact again if needed. HTH, Oscar El 28/04/2014, a las 19:26, chittari.va...@wipro.com escribió: Ranganath
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: JRebel support
Oh! I forgot to change the QuickStart pom! Sure that's it. I'll let you know. Thanks El 03/02/2014, a las 08:12, Dan Haywood d...@haywood-associates.co.uk escribió: Hi Oscar, You need to use trunk (1.4.0-SNAPSHOT) rather than 1.3.1; I think that's the problem. Let me know Cheers Dan Sorry to be brief, sent from my phone On 2 Feb 2014 19:08, GESCONSULTOR - Óscar Bou o@gesconsultor.com wrote: Hi, Dan. I'm very excited about the possibility to use the JRebel plugin, as it can accelerate a lot the workflow. I've downloaded and configured it, and I'm working over the latest quickstart archetype. I've added 1 new property to the TodoItem entity, and it has not been showed on the interface. These are the detailed steps followed. 1. Quickstart prototype. I create a new folder and run maven to create a project based on the latest Isis quickstart: mvn archetype:generate -D archetypeGroupId=org.apache.isis.archetype -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype -D archetypeVersion=1.3.1 -D groupId=com.mycompany -D artifactId=myapp -D version=1.0-SNAPSHOT -B 2. JRebel configuration. I've installed JRebel, and on the JRebel Config Center I've marked the dom and webapp projects. to be followed for changes by JRebel. I've downloaded from [1] the danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on the lib folder of the webapp module. I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the webapp module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added: stringAttribute key=org.eclipse.jdt.launching.VM_ARGUMENTS value=${jrebel_args} -Drebel.log=false -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m/ 3. DataNucleus. I assume that the DataNucleus - auto-enhancement option must be enabled on the dom module. That originates that, each time the Enhancer is executed (that's after any change on any file on the module) a JRebel dialog asks: You are launching a JRebel-enabled application without the JRebel agent. JRebel will not work without it. For avoiding that, I've checked the Don't perform this check again (you can restore it from preferences), and have chosen the Not this time option. 4. Run the webapp. I've launched the newly created Eclipse configuration and navigated to http://localhost:8080/wicket/;. I've installed the fixtures. 5. Changes in code. I add a new field to the ToDoItem entity. The following message appears on Eclipse: Class 'xxx' has a new non-sttic field 'newField', it will be null on existing instances. But after refreshing the webapp entity page, the field it's not showed. I've waited enough time. In fact, the following messages have been logged: 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'. 19:56:40,515 [Native 1238094722@qtp-1337505800-5 DEBUG] SELECT A0.category,A0.complete,A0.cost,A0.description,A0.dueBy,A0.notes,A0.ownedBy,A0.subcategory,A0.version FROM ToDoItem A0 WHERE A0.id = 11 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'. 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'. 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Subcategory'. 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Subcategory$1'. 2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Subcategory'. 2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category$1'. 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'. 2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category$2'. 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'. 2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category$3'. 2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category'. 19:56:40,697 [Native 1238094722@qtp-1337505800-5 DEBUG] SELECT 'dom.todo.ToDoItem' AS NUCLEUS_TYPE,A1.category,A1.complete,A1.cost,A1.description,A1.dueBy,A1.notes,A1.ownedBy,A1.subcategory,A1.id,A1.version FROM ToDoItemDependencies A0 INNER JOIN ToDoItem A1 ON A0.dependentId = A1.id WHERE A0.dependingId = 11 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$DependenciesComparator'. 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$DependenciesComparator$1'. 19:56:40,771 [Native 1238094722@qtp-1337505800-5 DEBUG] SELECT 'dom.todo.ToDoItem' AS NUCLEUS_TYPE,A0.category,A0.complete,A0.cost,A0.description,A0.dueBy,A0.notes,A0.ownedBy,A0.subcategory,A0.id,A0.version FROM ToDoItem A0 WHERE A0.ownedBy = 'sven' AND A0.category = 'Professional' 19:56:40,789 [Native 1238094722@qtp-1337505800-5 DEBUG] SELECT A0.attachment,A0.version FROM ToDoItem
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.
Re: @RequestScoped services, and other services
Thanks, Dan. How this complements the DataNucleus L2 cache? Should we explicitely use the cache in our repositories? I can wait to see how it' used on Estatio if it's easier to see than explain El 18/01/2014, a las 18:57, Dan Haywood d...@haywood-associates.co.uk escribió: Hi folks, Just wanted to do a quick heads-up that Isis now supports request-scoped services [1]. These are injected into entities and services just like any other service; in fact the implementation [2] is that the service is wrapped in a singleton proxy, and the per (thread) request switching is performed within the proxy itself. Anyway, to indicate that a service is request scoped, just annotate it with javax.enterprise.context.RequestScoped.This is an annotation from the CDI spec, of Java EE 6. I hope that one day Isis will support all of the CDI annotations; but @RequestScoped is probably the most important one that we haven't to date. A couple of notes on dependencies: first, that the CDI library is now a dependency of Isis' applib, and also that javassist is a dependency of the Isis runtime (for that clever proxy support). In addition, there are a number of new request-scoped services, part of the applib. The Scratchpad service [3] provides a way for passing arbitrary data between actions; primarily of use for bulk actions. There's an example showing its usage in the todo app [4]. The QueryResultsCache [5] is a mechanism for performance tuning, something that we'll be using in Estatio. The idea is that, if there's a repository query (typically against immutable reference data) tha will be called many times within a tight loop), then the repository can use the QueryResultsCache to hold onto the repository query results for subsequent calls within the same request. Finally, the Bulk.InteractionContext [6], a class that was shipped in 1.3.1 and which provides a mechanism for bulk actions to access the iterator (getIndex(), isFirst(), isLast() etc), has now been refactored to be a request scoped service (previously it was a thread local). Ta Dan [1] https://issues.apache.org/jira/browse/ISIS-652 [2] https://github.com/apache/isis/blob/e7f97df59ccbb0c996dcd53e5626f67a53a0b0a5/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServiceInstantiator.java [3] https://issues.apache.org/jira/browse/ISIS-654 [4] https://github.com/apache/isis/blob/e7f97df59ccbb0c996dcd53e5626f67a53a0b0a5/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java#L591 [5] https://issues.apache.org/jira/browse/ISIS-655 [6] https://issues.apache.org/jira/browse/ISIS-653
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: Apache Isis IDE configuration
Hi Darmesh. I'm also in Kepler. Just the folding function (that it's allowed to be installed on Kepler) is really useful for seeing and navigating the code better. El 16/01/2014, a las 11:29, Dan Haywood d...@haywood-associates.co.uk escribió: On 16 January 2014 10:26, Chohan, Dharmesh dharmesh.cho...@atos.net wrote: Hi Oscar The Apache ISIS IDE looks interesting. I tried installing into my Eclipse Kepler environment but I cannot see the plugin working. I downloaded the plugin and copied in Eclipse plugin folder. I've not tried it out for quite a while, but as Oscar says, it would seem to be broken on Kepler, but workable-ish on Juno. Realistically, this year my dev effort is going to be for the next-gen viewer, rather than getting this plugin working. Dan Please can you provide plugin installation steps. Thanks Dharmesh -Original Message- From: GESCONSULTOR - Óscar Bou [mailto:o@gesconsultor.com] Sent: Thursday, January 16, 2014 8:43 AM To: users@isis.apache.org Subject: 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: broken link in documentation
Hi Dave. Are you on the Package Explorer view ? I think it's not available on the Project Explorer one. HTH, Oscar El 02/01/2014, a las 19:15, dave.po...@pinan.co.uk escribió: On the page isis.apache.org/applib-guide/how-tos/about.html The link How to add an action to be called on every entity within a list, generates a 404 error, ie a missing page. The requested URL /applib-guide/how-tos/how-to-01-065-How-to-add-an-action-to-be-called-on-every-entity-within-a-list.html was not found on this server. Dave
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