[jbossseam-issues] [jboss-user] [JBoss Seam] Seam calling from servlet filter..
by rishi
I am very new to jboss Seam and hence a simple query.
I want to call up a seam component from inside a servlet filter as below:
AuthorizerActionLocal authLocal =
(AuthorizerActionLocal)Seam.componentForName("packageCreationAction")
.getInstance(
AuthorizerActionImpl.class);
UserVO userVO = authLocal.login(userName);
I get an error saying:
java.lang.IllegalStateException: No application context active at
org.jboss.seam.Component.forName(Component.java:1603)
What is going wrong? Is it possible to call a seam component from inside a
servlet filter as above? If not then is there any other way
Regards,
Rishi
17 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1338) Unifying Start-page & Start-state pageflows
by Andy Gibson (JIRA)
Unifying Start-page & Start-state pageflows
-------------------------------------------
Key: JBSEAM-1338
URL: http://jira.jboss.com/jira/browse/JBSEAM-1338
Project: JBoss Seam
Issue Type: Feature Request
Components: BPM
Affects Versions: 1.2.1.GA
Environment: Seam
Reporter: Andy Gibson
Do we really need two different types of page flows?
Pageflows started in pages.xml requires a <start-page> as the start of the pageflow. Pageflows started on @Begin annotated methods need a <start-state>. The problem is that you could easily want to start pageflows from either location, and would then need to write two identical pageflows to accomodate this.
i.e. A page for editing a widget is RESTful, and bookmarkable with the id in the URL, elsewhere, you may want to edit the same widget in a nested conversation. as part of another process.
For the RESTFul URL, you need to use pages.xml to define the conversation start and the pageflow.
For the other edit, you need a @begin annotated method (possibly with passing the widget instance in) and it requires a different pageflow, even though it is identical to the first. This annotation is also required to identify the need for a nested conversation.
There is a real need for initiating pageflows from two separate places, and a need for them to use the same page flow. It is possible to work around this and go back to the @Create @Begin(pageflow="editwidget:") annotations on a method for RESTful urls.
Given the number of times the problem appears in the forums, it appears to be an inobvious stumbling block without a real purpose as to its existence.
It just seems messy to have two identical flows, when in 99% of cases the start page/state can be derived from one unified pageflow. In the other 1%, it is still possible to write a separate pageflow, but having two incompatible but almost identical flows appears clumsy.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1162) propagation none with s:link
by Daniel Wiell (JIRA)
propagation none with s:link
----------------------------
Key: JBSEAM-1162
URL: http://jira.jboss.com/jira/browse/JBSEAM-1162
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Environment: Seam 1.2.1.GA, MyFaces 1.1.6 nighly from march, Facelets 1.1.11
Reporter: Daniel Wiell
<s:link action="/test.xhtml" propagate="none"/>
behaves diffrently from
<h:commandLink action="/test.xhtml">
<f:param name="conversationPropagation" value="none"/>
</h:commandLink>
The s:link propagates the conversation to the next view, while the h:commandLink doesn't.
Here are some code to replicate this behavior:
----------------------- test1.xhtml
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
<head></head>
<body>
<h:form>
<h:commandLink value="Refresh" action="/test1.xhtml"/>
<br/><br/>
<!-- Doesn't work expected - Propagates the conversation. -->
<s:link value="To test 2 (s:link)" action="/test2.xhtml" propagation="none"/>
<br/>
<!-- Works as expected - does not propagate the conversation -->
<h:commandLink value="To test 2 (h:commandLink no propagate)" action="/test2.xhtml">
<f:param name="conversationPropagation" value="none"/>
</h:commandLink>
<br/>
<!-- Works as expected - propagates the conversation -->
<h:commandLink value="To test 2 (h:commandLink propagates)" action="/test2.xhtml"/>
</h:form>
</body>
</html>
----------------------- test2.xhtml
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
<head></head>
<body>
<h:form>
<s:link value="To test 1" action="toTest1"/>
</h:form>
</body>
</html>
----------------------- The relevant parts from pages.xml
<page view-id="/test1.xhtml" >
<begin-conversation join="true"/>
</page>
<page view-id="/test2.xhtml">
<navigation>
<rule if-outcome="toTest1">
<begin-conversation/>
<redirect view-id="/test1.xhtml"/>
</rule>
</navigation>
</page>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1114) EntitySecurityListener problem in unit tests
by Artur Chyzy (JIRA)
EntitySecurityListener problem in unit tests
--------------------------------------------
Key: JBSEAM-1114
URL: http://jira.jboss.com/jira/browse/JBSEAM-1114
Project: JBoss Seam
Issue Type: Feature Request
Affects Versions: 1.2.0.GA
Environment: Windows XP SP2, JBoss AS EJB3 profile 4.0.5.GA
Reporter: Artur Chyzy
When putting to orm.xml config for EntitySecurityListener
<persistence-unit-metadata>
<persistence-unit-defaults>
<entity-listeners>
<entity-listener class="org.jboss.seam.security.EntitySecurityListener"/>
</entity-listeners>
</persistence-unit-defaults>
</persistence-unit-metadata>
and trying to run unit tests the following exception is thrown
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:33)
at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:78)
at org.hibernate.ejb.event.EntityCallbackHandler.postLoad(EntityCallbackHandler.java:71)
at org.hibernate.ejb.event.EJB3PostLoadEventListener.onPostLoad(EJB3PostLoadEventListener.java:35)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:201)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.jav
a:370)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:801)
at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:155)
at pl.alternativ.med.pacjent.DeklaracjaPOZUnitTest.utworz(DeklaracjaPOZUnitTest.java:78)
at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:30)
... 42 more
Caused by: java.lang.IllegalStateException: No active session context
at org.jboss.seam.security.Identity.instance(Identity.java:108)
at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:24)
... 47 more
... Removed 26 stack frames
Without EntitySecurityListener config in orm.xml tests runs fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-668) method bindings with a parameter don't work in facelets tag source files
by Guy Veraghtert (JIRA)
method bindings with a parameter don't work in facelets tag source files
------------------------------------------------------------------------
Key: JBSEAM-668
URL: http://jira.jboss.com/jira/browse/JBSEAM-668
Project: JBoss Seam
Issue Type: Bug
Reporter: Guy Veraghtert
Attachments: seam-bug-method-parameter.zip
Method bindings with a parameter on a parameterized target bean don't work in a facelets tag source file.
java.lang.NullPointerException
at org.jboss.seam.ui.facelet.MethodExpressionHelper.findParamTypes(MethodExpressionHelper.java:146)
at org.jboss.seam.ui.facelet.MethodExpressionHelper.invokeTheExpression(MethodExpressionHelper.java:98)
at org.jboss.seam.ui.facelet.ParamMethodExpression.invoke(ParamMethodExpression.java:62)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:96)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months