[JBoss JIRA] (WFLY-10730) Scan for entities in persistence root when using unmanaged JPA persistence unit
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10730?page=com.atlassian.jira.plugin... ]
Scott Marlow resolved WFLY-10730.
---------------------------------
Resolution: Rejected
I don't think there is a WildFly bug to resolve here.
> Scan for entities in persistence root when using unmanaged JPA persistence unit
> -------------------------------------------------------------------------------
>
> Key: WFLY-10730
> URL: https://issues.jboss.org/browse/WFLY-10730
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 13.0.0.Final
> Reporter: Stephen Fikes
> Assignee: Scott Marlow
> Attachments: testcase.zip
>
>
> Per the [JPA specification|http://download.oracle.com/otn-pub/jcp/persistence-2_2-mrel...], entities in the root should not need to be explicitly specified (they should be automatically discovered). This works in a managed scenario (using injected entity manager) but doesn't work in an un-managed case (entity manager factory / entity manager created explicitly in application code) when using the same persistence unit.
> Also attempted to work around the limitation by declaring an explicit scanner ({{hibernate.archive.scanner=org.jboss.as.jpa.hibernate5.HibernateArchiveScanner}}) but this requires disabling managed JPA for the unit ({{jboss.as.jpa.managed=false}}) so a single unit cannot be used in both managed and un-managed scenarios.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFLY-10730) Scan for entities in persistence root when using unmanaged JPA persistence unit
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10730?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10730:
-------------------------------------
It looks like ORM in this test code, doesn't allow the managed persistence unit to include the scanner by class name:
I tried adding the managedUnit to include:
{code}
<property name="hibernate.archive.scanner" value="org.jboss.as.jpa.hibernate5.HibernateArchiveScanner"/>
{code} and we get exception:
{code}
.service.StartException in service jboss.persistenceunit."javaee-ear-1.0-SNAPSHOT.ear#managedUnit".__FIRST_PHASE__: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: org.jboss.as.jpa.hibernate5.HibernateArchiveScanner
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:650)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: org.jboss.as.jpa.hibernate5.HibernateArchiveScanner
at org.hibernate.boot.internal.ClassLoaderAccessImpl.classForName(ClassLoaderAccessImpl.java:78)
at org.hibernate.boot.model.process.internal.ScanningCoordinator.buildScanner(ScanningCoordinator.java:120)
at org.hibernate.boot.model.process.internal.ScanningCoordinator.coordinateScan(ScanningCoordinator.java:75)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.prepare(MetadataBuildingProcess.java:99)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:232)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:167)
at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:32)
at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:89)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.<init>(TwoPhaseBootstrapImpl.java:39)
at org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:203)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)
... 9 more
{code}
I'm not sure why the unmanaged persistence unit is allowed to use the scanner class (by class name) but the (incorrectly named) "managed" persistence unit is not allowed to specify the scanner class (by class name).
The "managed" persistence unit is incorrectly named because it contains the following settings, which do not set jboss.as.jpa.managed to false, so a more correct name might be "managedANDunmanaged":
{code}
<persistence-unit name="managedUnit">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
</properties>
</persistence-unit>
{code}
> Scan for entities in persistence root when using unmanaged JPA persistence unit
> -------------------------------------------------------------------------------
>
> Key: WFLY-10730
> URL: https://issues.jboss.org/browse/WFLY-10730
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 13.0.0.Final
> Reporter: Stephen Fikes
> Assignee: Scott Marlow
> Attachments: testcase.zip
>
>
> Per the [JPA specification|http://download.oracle.com/otn-pub/jcp/persistence-2_2-mrel...], entities in the root should not need to be explicitly specified (they should be automatically discovered). This works in a managed scenario (using injected entity manager) but doesn't work in an un-managed case (entity manager factory / entity manager created explicitly in application code) when using the same persistence unit.
> Also attempted to work around the limitation by declaring an explicit scanner ({{hibernate.archive.scanner=org.jboss.as.jpa.hibernate5.HibernateArchiveScanner}}) but this requires disabling managed JPA for the unit ({{jboss.as.jpa.managed=false}}) so a single unit cannot be used in both managed and un-managed scenarios.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (DROOLS-2788) UX to support selection of multiple data/domain object instances
by Liz Clayton (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2788?page=com.atlassian.jira.plugi... ]
Liz Clayton commented on DROOLS-2788:
-------------------------------------
[~danielezonca] Please add any additional info as needed. I attached a pic, not as a design proposal exactly but as an example of one way to present an instance in the UI (e.g. in the event of multiple Applicant instances.)
> UX to support selection of multiple data/domain object instances
> ----------------------------------------------------------------
>
> Key: DROOLS-2788
> URL: https://issues.jboss.org/browse/DROOLS-2788
> Project: Drools
> Issue Type: Task
> Components: Scenario Simulation and Testing
> Reporter: Liz Clayton
> Assignee: Liz Clayton
> Labels: ScenarioSimulation, UX, UXTeam
> Attachments: Screen Shot 2018-07-24 at 2.22.20 PM.png
>
>
> As a user I want to define multiple data/domain object instances per scenario (i.e. possible to have a scenario with more than one instance of “Person”), so that I can create a test scenario.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (DROOLS-2788) UX to support selection of multiple data/domain object instances
by Liz Clayton (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2788?page=com.atlassian.jira.plugi... ]
Liz Clayton updated DROOLS-2788:
--------------------------------
Description: As a user I want to define multiple data/domain object instances per scenario (i.e. possible to have a scenario with more than one instance of “Person”), so that I can create a test scenario. (was: As a business user I want to +Add+ a scenario test asset, so that I perform simulation tests against certain (decision) asset types, including: Rules, DMN, and Processes. )
> UX to support selection of multiple data/domain object instances
> ----------------------------------------------------------------
>
> Key: DROOLS-2788
> URL: https://issues.jboss.org/browse/DROOLS-2788
> Project: Drools
> Issue Type: Task
> Components: Scenario Simulation and Testing
> Reporter: Liz Clayton
> Assignee: Liz Clayton
> Labels: ScenarioSimulation, UX, UXTeam
> Attachments: Screen Shot 2018-07-24 at 2.22.20 PM.png
>
>
> As a user I want to define multiple data/domain object instances per scenario (i.e. possible to have a scenario with more than one instance of “Person”), so that I can create a test scenario.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (DROOLS-2788) UX to support selection of multiple data/domain object instances
by Liz Clayton (JIRA)
Liz Clayton created DROOLS-2788:
-----------------------------------
Summary: UX to support selection of multiple data/domain object instances
Key: DROOLS-2788
URL: https://issues.jboss.org/browse/DROOLS-2788
Project: Drools
Issue Type: Task
Components: Scenario Simulation and Testing
Reporter: Liz Clayton
Assignee: Liz Clayton
As a business user I want to +Add+ a scenario test asset, so that I perform simulation tests against certain (decision) asset types, including: Rules, DMN, and Processes.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (DROOLS-2787) "Data Type" tree-grid table interactions.
by Liz Clayton (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2787?page=com.atlassian.jira.plugi... ]
Liz Clayton updated DROOLS-2787:
--------------------------------
Sprint: 2018 Week 30-32
> "Data Type" tree-grid table interactions.
> -----------------------------------------
>
> Key: DROOLS-2787
> URL: https://issues.jboss.org/browse/DROOLS-2787
> Project: Drools
> Issue Type: Story
> Components: DMN Editor
> Reporter: Liz Clayton
> Assignee: Liz Clayton
> Labels: UX, UXTeam, drools-tools
> Attachments: treegrid.png
>
>
> *Background*
> Persona: Business analyst or Rules practitioner
> Use Cases:
> As a user I want to:
> * *Edit* the list of Data Types, using the appropriate type considering the DMN model (eg: in the age line, we need to select "Numeric" in the combobox.)
> * *Add* a new data type, which might be a nested object as defined by the (ItemDefinition.)
> * *Remove* Data Types from the list of available selections.
> * be prevented from making selections that are not valid or would cause an error.
> * know that when I edit a data type the changes will be updated in the DMN model.
> Functional considerations/ pre conditions:
> * Outside of simple view/select, Data Types list (and options) will be presented as a tree-grid within a modal dialog. Discussed in detail within Epic subtask for the same.
> * Design needs to be consistent with Stunner and PF components, such as: https://www.patternfly.org/pattern-library/widgets/#treegrid-table
> Verification conditions:
> * Scrum team and PO review.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months