[jira] [Comment Edited] (DELTASPIKE-935) ds:disableClientWindow should also disable JSF 2.2 rendering mode
[ https://issues.apache.org/jira/browse/DELTASPIKE-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14614725#comment-14614725 ] Gerhard Petracek edited comment on DELTASPIKE-935 at 7/6/15 2:05 PM: - we need to re-visit if the refactored code for this ticket breaks deltaspike-jsf-module-impl-ee6 was (Author: gpetracek): the refactored code for this ticket breaks deltaspike-jsf-module-impl-ee6 ds:disableClientWindow should also disable JSF 2.2 rendering mode - Key: DELTASPIKE-935 URL: https://issues.apache.org/jira/browse/DELTASPIKE-935 Project: DeltaSpike Issue Type: Bug Components: JSF-Module, JSF22-Module Affects Versions: 1.4.1 Reporter: Thomas Andraschko Assignee: Thomas Andraschko Fix For: 1.4.2 to prevent jfwid on URLs with Mojarra -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DELTASPIKE-935) ds:disableClientWindow should also disable JSF 2.2 rendering mode
[ https://issues.apache.org/jira/browse/DELTASPIKE-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14615699#comment-14615699 ] Thomas Andraschko commented on DELTASPIKE-935: -- it starts without exceptions on e.g. both GF3 and JBoss7. ds:disableClientWindow should also disable JSF 2.2 rendering mode - Key: DELTASPIKE-935 URL: https://issues.apache.org/jira/browse/DELTASPIKE-935 Project: DeltaSpike Issue Type: Bug Components: JSF-Module, JSF22-Module Affects Versions: 1.4.1 Reporter: Thomas Andraschko Assignee: Thomas Andraschko Fix For: 1.4.2 to prevent jfwid on URLs with Mojarra -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (DELTASPIKE-946) Prevent jfwid rendering
[ https://issues.apache.org/jira/browse/DELTASPIKE-946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Andraschko resolved DELTASPIKE-946. -- Resolution: Fixed Prevent jfwid rendering --- Key: DELTASPIKE-946 URL: https://issues.apache.org/jira/browse/DELTASPIKE-946 Project: DeltaSpike Issue Type: Improvement Components: JSF22-Module Affects Versions: 1.4.1 Reporter: Thomas Andraschko Assignee: Thomas Andraschko Fix For: 1.4.2 We can and should prevent the jfwid on links when we don't run in the DELEGATED mode. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (DELTASPIKE-946) Prevent jfwid rendering
[ https://issues.apache.org/jira/browse/DELTASPIKE-946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Andraschko updated DELTASPIKE-946: - Description: We can and should prevent the jfwid on links when we don't run in the DELEGATED mode. (was: We can prevent the jfwid on links when we don't run in the DELEGATED mode. We need just to wrap the JSF 2.2 ClientWindow and do the following: @Override public boolean isClientWindowRenderModeEnabled(FacesContext context) { if (!delegateWindowHandling) { return false; } return super.isClientWindowRenderModeEnabled(context); }) Prevent jfwid rendering --- Key: DELTASPIKE-946 URL: https://issues.apache.org/jira/browse/DELTASPIKE-946 Project: DeltaSpike Issue Type: Improvement Components: JSF22-Module Affects Versions: 1.4.1 Reporter: Thomas Andraschko Assignee: Thomas Andraschko Fix For: 1.4.2 We can and should prevent the jfwid on links when we don't run in the DELEGATED mode. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Cascade persist and merge with Repository.
I am seeing unexpected behavior with Cascades on relationships with repositories with DeltaSpike. I have tried with both v1.4.1 and v1.4.0 I have two entities Booking and Adventure Booking has a OneToOne Relationship with Adventure with a CacadeType = REFRESH *@OneToOne(cascade = CascadeType.REFRESH)* @JoinColumn(name = ADVENTURE_NAME, referencedColumnName = ADVENTURE_NAME ) private Adventure adventure; I have a unit test to test that I cannot create a Booking for an adventure that does not exist in the database. *@Test* public void cannotCreateNewAdventureFromBooking() throws Exception { Booking booking = new Booking (); Adventure adventure = new Adventure (test); booking.setAdventure(adventure); this.bookingRepository.save(booking); this.bookingRepository.flush(); } I expect the test to fail with IllegalStateException that JPA throws, but the repository save inserts an record in Adventure first and then inserts into Booking for that Adventure. *LOG-* [EL Fine]: sql: Connection(-49208622)--INSERT INTO ADVENTURE (ADVENTURE_NAME, DESCRIPTION, ) VALUES (?, ?) [EL Fine]: sql: Connection(-49208622)-- bind = [test, null] [EL Fine]: sql: Connection(-49208622)--SELECT CURRENT_TIMESTAMP() [EL Fine]: sql: Connection(-49208622)--INSERT INTO BOOKING (BOOKING_ID, ADVENTURE_NAME, CUST_EMAIL) VALUES (?, ?, ?) [EL Fine]: sql: Connection(-49208622)-- bind = [101, test, null, null] I have another test that uses the EntityManager got from the repository to persist and then the repository.flush, and I see the JPA IllegalStateException buried deep within the DeltaSpike Exception. *@Test* public void cannotCreateNewAdventureFromBookingJPA() throws Exception { Booking booking = new Booking (); Adventure adventure = new Adventure (test); booking.setAdventure(adventure); EntityManager entityManager = this.bookingRepository.getEntityManager(); entityManager.getTransaction().begin(); *entityManager.persist(booking); this.bookingRepository.flush();* LOG- org.apache.deltaspike.data.api.QueryInvocationException: Failed calling Repository: [Repository=com.myApp.repository.BookingRepository,entity=com.myApp.domain.booking.Booking,method=flush,exception=class org.apache.deltaspike.data.api.QueryInvocationException,message=Failed calling Repository: [Repository=com.myApp.repository.BookingRepository,entity=com.myApp.domain.booking.Booking,method=flush,exception=class org.apache.deltaspike.data.api.QueryInvocationException,message=Failed calling Repository: [Repository=com.myApp.repository.BookingRepository,entity=com.myApp.domain.booking.Booking,method=flush,exception=class java.lang.reflect.InvocationTargetException,message=null at org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:91) at org.apache.deltaspike.proxy.impl.invocation.DelegateManualInvocationHandler.proceedOriginal(DelegateManualInvocationHandler.java:46) at org.apache.deltaspike.proxy.impl.invocation.AbstractManualInvocationHandler.invoke(AbstractManualInvocationHandler.java:63) at org.apache.deltaspike.proxy.impl.invocation.DelegateManualInvocationHandler.staticInvoke(DelegateManualInvocationHandler.java:39) at com.myApp.repository.BookingRepository$$DSPartialBeanProxy.flush(Unknown Source) at com.myApp.domain.booking.jpa.BookingJpaRelationshipAnnotationsIntTest.cannotCreateNewAdventureFromBookingJPA(BookingJpaRelationshipAnnotationsIntTest.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) 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.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareMethodInvoker.invokeMethod(CdiTestRunner.java:340) at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareMethodInvoker.evaluate(CdiTestRunner.java:312) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner.runChild(CdiTestRunner.java:174) 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)
[jira] [Created] (DELTASPIKE-947) StackOverFlow with DELEGATED window mode and undefined javax.faces.CLIENT_WINDOW_MODE
Thomas Andraschko created DELTASPIKE-947: Summary: StackOverFlow with DELEGATED window mode and undefined javax.faces.CLIENT_WINDOW_MODE Key: DELTASPIKE-947 URL: https://issues.apache.org/jira/browse/DELTASPIKE-947 Project: DeltaSpike Issue Type: Bug Components: JSF22-Module Affects Versions: 1.4.1 Reporter: Thomas Andraschko Assignee: Thomas Andraschko Fix For: 1.4.2 Steps to reproduce: 1) specialize DefaultClientWindowConfig#getClientWindowRenderMode with DELEGATED mode 2) remove javax.faces.CLIENT_WINDOW_MODE from web.xml The problem is that the ClientWindowAdapter will be registered in this case because JsfModuleConfig#getDefaultWindowMode returns null and not DELEGATED. Therefor our DelegatedWindowStrategy delegates to our CLIentWindowAdapter this delegates back to our DelegatedWindowStrategy. We should merge the logic from DefaultClientWindowConfig#getClientWindowRenderMode and JsfModuleConfig#getDefaultWindowMode to e.g. JsfModuleConfig#getClientWindowRenderMode and use this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)