[JBoss JIRA] (SEAMPERSIST-75) Provide a way to intercept method calls from EntityManager
by Anthony O. (Created) (JIRA)
Provide a way to intercept method calls from EntityManager
----------------------------------------------------------
Key: SEAMPERSIST-75
URL: https://issues.jboss.org/browse/SEAMPERSIST-75
Project: Seam Persistence
Issue Type: Feature Request
Affects Versions: 3.1.0.Beta4
Reporter: Anthony O.
Priority: Critical
I'm trying to intercept method calls to {{EntityManager}} in order to make modifications to some entities before persisting them.
I've tried many ways to do that (see http://stackoverflow.com/questions/8213285/how-to-intercept-methods-of-en...) but I see that the real problem is that it's not easy to make a proxy behind the {{EntityManager}} bean created by {{org.jboss.seam.persistence.ManagedPersistenceContextExtension}}.
It seems that a way to do that has been thinked, but cannot be used today. In {{ManagedPersistenceContextExtension.beforeBeanDiscovery}}, a {{Set}} of {{SeamPersistenceProvider}} s is created *BUT* {{org.jboss.seam.persistence.HibernatePersistenceProvider}} is always put in front of all others, so we cannot create our own provider to extend the features of current ones as it is chosen in EE environment which use hibernate (JBoss 7 for instance).
I think the best way to do that would be to create a {{Producer}} bean and not an instanciable bean, as with CDI we could replace that {{Producer}} with an {{@Observes ProcessProducer}} and a {{setProducer()}} to extend it.
At the moment, we can only {{@Observes ProcessBean}} on the {{EntityManager}} bean created by Seam Persistence, and do nothing about it as the CDI spec doesn't enable us to ask the container to replace the observed bean with {{ProcessBean}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (SEAMREMOTING-51) model example date validation problem
by Tomáš Remeš (Created) (JIRA)
model example date validation problem
-------------------------------------
Key: SEAMREMOTING-51
URL: https://issues.jboss.org/browse/SEAMREMOTING-51
Project: Seam Remoting
Issue Type: Bug
Affects Versions: 3.1.0.Beta3
Environment: seam 3.1.0.Beta3, AS7
Reporter: Tomáš Remeš
Priority: Minor
Fix For: 3.1.0.Final
Steps to reproduce:
1.deploy and run remoting-model example
2.click on "Create new person"
3.click on "Apply changes" (or fill in some invalid value to "Date of birth" input before. for example 13 or some string)
Following expcetion is thrown:
ERROR [org.jboss.seam.remoting.Remoting] (http--127.0.0.1-8080-1) Error: java.lang.RuntimeException: Could not convert value while unmarshaling
at org.jboss.seam.remoting.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:193) [seam-remoting-3.1.0.Beta3.jar:]
at org.jboss.seam.remoting.model.ModelHandler.processApplyRequest(ModelHandler.java:241) [seam-remoting-3.1.0.Beta3.jar:]
at org.jboss.seam.remoting.model.ModelHandler.handle(ModelHandler.java:83) [seam-remoting-3.1.0.Beta3.jar:]
at org.jboss.seam.remoting.Remoting.service(Remoting.java:255) [seam-remoting-3.1.0.Beta3.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.0.Beta3.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:72) [solder-impl-3.1.0.Beta3.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: org.jboss.seam.remoting.wrapper.ConversionException: Date value [NaNNaNNaNNaNNaNNaNNaN] is not in a valid format.
at org.jboss.seam.remoting.wrapper.DateWrapper.convert(DateWrapper.java:51) [seam-remoting-3.1.0.Beta3.jar:]
at org.jboss.seam.remoting.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:190) [seam-remoting-3.1.0.Beta3.jar:]
... 28 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (SEAM-107) HttpSessionStatus.isActive and HttpSession.isNew() throw WELD-000052 Cannot return null from a non-dependent producer method
by Geoffrey De Smet (Created) (JIRA)
HttpSessionStatus.isActive and HttpSession.isNew() throw WELD-000052 Cannot return null from a non-dependent producer method
----------------------------------------------------------------------------------------------------------------------------
Key: SEAM-107
URL: https://issues.jboss.org/browse/SEAM-107
Project: Seam 3 Distribution
Issue Type: Bug
Environment: seam 3.1.0.Beta2
Reporter: Geoffrey De Smet
We have this code in guvnor:
{code}
@ApplicationScoped
public class Backchannel {
...
@Inject
private HttpSessionStatus sessionStatus;
...
public List<PushResponse> subscribe() {
if (sessionStatus.isActive()) {
...
}
}
...
{code}
Which is a direct copy of this documented code:
http://docs.jboss.org/seam/3/latest/reference/en-US/html_single/#injectab...
which throws this exception:
{code}
ERROR 06-10 14:38:59,303 (LoggingHelper.java:error:74) Service method 'public abstract java.util.List org.drools.guvnor.client.rpc.RepositoryService.subscribe()' threw an unexpected exception: org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a non-dependent producer method: [method] @Produces @Typed @RequestScoped protected org.jboss.seam.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a non-dependent producer method: [method] @Produces @Typed @RequestScoped protected org.jboss.seam.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
at org.jboss.weld.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:256)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:362)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:122)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
at org.jboss.weld.proxies.HttpServletRequest$-55412919$Proxy$_$$_WeldClientProxy.isRequestedSessionIdValid(HttpServletRequest$-55412919$Proxy$_$$_WeldClientProxy.java)
at org.jboss.seam.servlet.http.HttpSessionStatus.isActive(HttpSessionStatus.java:41)
at org.jboss.seam.servlet.http.HttpSessionStatus$Proxy$_$$_WeldClientProxy.isActive(HttpSessionStatus$Proxy$_$$_WeldClientProxy.java)
at org.drools.guvnor.server.Backchannel.subscribe(Backchannel.java:64)
at org.drools.guvnor.server.Backchannel$Proxy$_$$_WeldClientProxy.subscribe(Backchannel$Proxy$_$$_WeldClientProxy.java)
at org.drools.guvnor.server.ServiceImplementation.subscribe(ServiceImplementation.java:934)
at org.drools.guvnor.server.RepositoryServiceServlet.subscribe(RepositoryServiceServlet.java:689)
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.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
{code}
Note: there is no seam 3 servlet JIRA project, so I dropped it under Seam 3 distribution.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (SEAMSECURITY-121) [Regression] 3.1.0.Beta4 eats exceptions in IdentityImpl + returns RESPONSE_LOGIN_FAILED instead of RESPONSE_LOGIN_EXCEPTION
by Geoffrey De Smet (Created) (JIRA)
[Regression] 3.1.0.Beta4 eats exceptions in IdentityImpl + returns RESPONSE_LOGIN_FAILED instead of RESPONSE_LOGIN_EXCEPTION
----------------------------------------------------------------------------------------------------------------------------
Key: SEAMSECURITY-121
URL: https://issues.jboss.org/browse/SEAMSECURITY-121
Project: Seam Security
Issue Type: Bug
Affects Versions: 3.1.0.Beta4
Reporter: Geoffrey De Smet
Priority: Critical
Fix For: 3.1.0.Beta5
org.jboss.seam.security.IdentityImpl#authenticate line 237 eats exceptions:
{code}
} catch (Exception ex) {
authenticating = false;
if (ex instanceof AuthenticationException) throw (AuthenticationException) ex;
return false;
}
{code}
As a result, my @PostConstruct weld exception isn't show in the log between these 2 lines:
{code}
INFO 26-10 12:05:00,849 (DemoAuthenticator.java:authenticate:65) Demo login for user (admin) succeeded.
INFO 26-10 12:39:19,825 (SecurityServiceImpl.java:login:70) Logging in user [admin]
{code}
Extra bug:
{code}
public String login() {
try {
...
boolean success = authenticate();
...
return RESPONSE_LOGIN_FAILED;
} catch (Exception ex) { // Doesn't happen any more because authenticate() eat the exception
...
return RESPONSE_LOGIN_EXCEPTION;
}
}
{code}
Regression since Beta3 in Beta4.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (SEAMSECURITY-130) Usage and implementation of equals/hashcode
by bram meijboom (Created) (JIRA)
Usage and implementation of equals/hashcode
--------------------------------------------
Key: SEAMSECURITY-130
URL: https://issues.jboss.org/browse/SEAMSECURITY-130
Project: Seam Security
Issue Type: Bug
Affects Versions: 3.1.0.Beta4
Environment: PICKETLINK-LDAP 1.5.0.ALPHA02, PICKETLINK 1.5.0.ALPHA02
Reporter: bram meijboom
Priority: Critical
Implementations of equals and hashcode are not consistent for the implemented org.picketlink.idm.spi.model.* classes, so a SimpleIdentityObject is not found in a hashset with IdentityObjectImpl's if there is a entry in the set that has the same name/type as the ldap one.
Due to the usage of hashsets in FallbackIdentityStoreRepository you end up with double entries when query-ing for objects. i think this is also a issue in the implementation of the FallbackIdentityStoreRepository (wich should use the interface only and not the equals/hashcode) or the api wich should provide consistent way of determining the hashcode and equals.
affected class:org.jboss.seam.security.management.IdentityObjectImpl
suggestions:
- use the provided org.picketlink.idm.impl.types.SimpleIdentityObject in the org.jboss.seam.security.management.picketlink.JpaIdentityStore
- make IdentityObjectImpl a subclass of SimpleIdentityObject
PS:
the implementation of LDAPIdentityObjectImpl is not consistent to, it uses the id.hashCode() in calculating the hashcode and not the name
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (SEAMPERSIST-70) Seam Persistence documentation issues and comments
by Marek Schmidt (Created) (JIRA)
Seam Persistence documentation issues and comments
--------------------------------------------------
Key: SEAMPERSIST-70
URL: https://issues.jboss.org/browse/SEAMPERSIST-70
Project: Seam Persistence
Issue Type: Bug
Affects Versions: 3.1.0.Beta3
Reporter: Marek Schmidt
Fix For: 3.1.0.Final
Persistence
In general
* lots of persistence docs mention seam transactional stuff, while the Seam transactional docs are empty. The documentation should perhaps explain the persistence/transactional split and what modules does what.
1.2. Getting Started
* "seam-solder.jar" should be "solder-impl.jar",
* "If you are in a java SE environment you will probably also require seam-xml.jar as well for configuration purposes."
should be removed
* "seam-persistence-impl" should be "seam-persistence"
* "org.jboss.seam.solder" should be "org.jboss.solder"
* "seam-solder" should be "solder-impl"
* "org.jboss.seam.xml:seam-xml-config" dependency should be removed
1.3. Transaction Management
* "Seam" should perhaps be "Seam Persistence"?
1.3.1. Configuration
* "seam-xml" should be "Solder XML"
* "Seam Config XML" should be "Solder Config XML"
* typo in the example fragment "</tentityManager>" instead of "</t:entityManager>"
* "If you need multiple persistence units in your application then we highly recommend using an EE 6 compatible server, such as JBoss 6."
we should probably suggest JBoss AS 7 instead.
Missing pieces
* FlushModeManager, FlushModeType, ManagedPersistenceContext, PersistenceContexts, are not documented
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (SEAM-115) Release has dependencies on an older release
by Ondrej Skutka (Created) (JIRA)
Release has dependencies on an older release
--------------------------------------------
Key: SEAM-115
URL: https://issues.jboss.org/browse/SEAM-115
Project: Seam 3 Distribution
Issue Type: Bug
Affects Versions: 3.1.0.Beta4
Reporter: Ondrej Skutka
Assignee: Shane Bryzak
Priority: Blocker
Fix For: 3.1.0.CR1
In Seam 3.1.0.Beta4 there are following dependencies/references
on 3.1.0-Beta3:
security/pom.xml
persistence/pom.xml
jcr/pom.xml
on 3.1.0-Beta2:
seam-3.1.0.Beta4-build/faces/examples/viewconfig/pom.xml
on 3.1.0-SNAPSHOT:
security/examples/saml-sp/pom.xml
security/examples/saml-idp/pom.xml
security/examples/openid-op/pom.xml
persistence/tests/jetty-hibernate/pom.xml
persistence/tests/jetty-openjpa/pom.xml
persistence/tests/jbossas-hibernate/pom.xml
faces/examples/viewaction/pom.xml
jms/testsuite/pom.xml
solder/examples/princess-rescue/pom.xml
solder/examples/quiz/pom.xml
on 3.0.0-SNAPSHOT:
jms/modules/activemq/pom.xml
jms/modules/hornetq/pom.xml
jms/modules/openmq/pom.xml
on 3.0.0-CR1:
remoting/pom.xml (should be 3.0.0.CR2?)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months