[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2286) MDB activated too early to use Seam components as a standard EJB
by Siarhei Dudzin (JIRA)
MDB activated too early to use Seam components as a standard EJB
----------------------------------------------------------------
Key: JBSEAM-2286
URL: http://jira.jboss.com/jira/browse/JBSEAM-2286
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.GA
Reporter: Siarhei Dudzin
Priority: Critical
As specified in the forum reference I have an MDB which uses a SLSB (also declared as Seam component) with business logic. If I deploy the application and there are already messages in the queue I get the following exception:
javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalStateException: Attempted to invoke a
Seam component outside the an initialized application
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
at $Proxy111.onMessage(Unknown Source)
Looks like the MDB processing the message before Seam is initialized?
This forces me to undeclare the SLSB as a Seam component and (potentially) duplicate business logic if I want to re-use the same functionality of the SLSB in Seam.
I could use the solution from http://www.jboss.org/?module=bb&op=viewtopic&t=100946 but then it would force me to use vendor-specific API.
--
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
12 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2764) Factory method does not create objects properly
by Bogdan Minciu (JIRA)
Factory method does not create objects properly
-----------------------------------------------
Key: JBSEAM-2764
URL: http://jira.jboss.com/jira/browse/JBSEAM-2764
Project: JBoss Seam
Issue Type: Bug
Components: EJB3
Affects Versions: 2.0.1.GA
Reporter: Bogdan Minciu
Hello,
It seems that my @Factory method is recognizing the created objects only in its command block. I have this class:
@Stateful
@Name("xtw")
@Scope(ScopeType.SESSION)
@AutoCreate
public class XTextSessionWrapper implements LocalXTextSessionWrapper {
...
@In(required=false, create=true)
@Out
private XLanguage activeLanguage;
public String getText(String identifier) {
log.info("getText(1): identifier= #0, activeLanguage= #1", identifier, getActiveLanguage());
XTextEntry xte = xTextEntryDAO.findXTextEntry(identifier, getActiveLanguage());
log.info("getText(2): identifier= #0, activeLanguage= #1", identifier, getActiveLanguage());
xte.getXtext();
}
@Factory(value="activeLanguage", autoCreate=true)
public void initActiveLanguage() {
XLanguage xl = xLanguageDAO.findXLanguageByIdentifier("ro");
log.info("initActiveLanguage(1): activeLanguage initialized to #0", xl.getIdentifier());
setActiveLanguage(xl);
log.info("initActiveLanguage(1): activeLanguage initialized to #0", getActiveLanguage().getIdentifier());
}
public XLanguage getActiveLanguage() {
return activeLanguage;
}
public void setActiveLanguage(XLanguage activeLanguage) {
this.activeLanguage = activeLanguage;
}
...
}
And i am calling the getText() method. The method calling is as expected:
1. the injected activeLanguage is detecting that it has a null value,
2. the initActiveLanguage() factory method is called
3. then the getText() method is continuing its execution.
But, the problem is that when the application exists the @Factory method block, the created objects: activeLanguage is lost and reported again as null.
Here is the output:
12:43:48,203 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,203 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,703 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,703 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,703 INFO [XTextSessionWrapper] getText(1): identifier= com.brit.xcms.cms.Category.12.name, activeLanguage= null
12:43:49,234 INFO [XTextSessionWrapper] getText(2): identifier= com.brit.xcms.cms.Category.12.name, activeLanguage= null
Where did I went wrong? Why is the activeLanguage factoried value lost when i leave the initActiveLanguage() method?
--
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
12 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2697) Add attribute to s:link tag to make creation of magic dataModelSelection URL parameter optional
by Wolfgang Schwendt (JIRA)
Add attribute to s:link tag to make creation of magic dataModelSelection URL parameter optional
-----------------------------------------------------------------------------------------------
Key: JBSEAM-2697
URL: http://jira.jboss.com/jira/browse/JBSEAM-2697
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF Controls
Affects Versions: 2.0.1.GA
Reporter: Wolfgang Schwendt
Priority: Minor
When an s:link component (org.jboss.seam.ui.component.UILink) is placed into a h:dataTable backed by a javax.faces.model.DataModel, the s:link automatically generates the magic token for the magic "dataModelSelection" parameter regardless of whether the latter is really needed or not.
This can generate ugly URLs. The following example is particulary ugly:
http://127.0.0.1:8080/seminaris/seminarDetails.seam?seminarId=2&dataModel...
Without the "dataModelSelection" parameter, the URL would look much cleaner:
http://127.0.0.1:8080/seminaris/seminarDetails.seam?semId=2
So my question: Couldn't we make the "dataModelSelection" parameter optional? (For example, by adding an attribute to the s:link tag).
Btw: I'm aware that org.jboss.seam.ui.component.UISeamCommandBase.getUrl() is the culprit that triggers inclusion of the the dataModelSelection parameter, so I know how to remove the dataModelSelection parameter generation, but it would be nice if also the officially released Seam version allowed the deactivation of the magic token generation.
Further, no magic token is generated if a UIDataTable is supplied by a normal List rather than a DataModel (cf. UISeamCommandBase.getSelection() ), but unfortunately there can be cases where it makes sense to supply the table data as DataModel rather than normal List.
--
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
12 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1279) use ExceptionFilter in Remoting
by Keith Naas (JIRA)
use ExceptionFilter in Remoting
-------------------------------
Key: JBSEAM-1279
URL: http://jira.jboss.com/jira/browse/JBSEAM-1279
Project: JBoss Seam
Issue Type: Feature Request
Components: Remoting
Affects Versions: 1.2.1.GA
Reporter: Keith Naas
Assigned To: Shane Bryzak
Currently, the Remoting resource class swallows all exceptions. Because of this, it is not possible to gracefully handle security restrictions in WebRemote methods from the client.
Two ideas:
# Simply bubble the Exception all the way up through the ResourceServlet. If the ResourceServlet throws the exception, the ExceptionFilter should pick up on it. The XHR would then receive the proper error code as defined in the pages.xml and could properly redirect the user to the correct login page.
# Have the ResourceServlet trap for NotLoggedInException's or NotAuthorizedException's and return the respective HTTP status code. The XHR would then receive the error code and be able to redirect the user to the correct login 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
13 years, 2 months