[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1610) Add log4j diagnostic context filter to Seam logging package
by Eric Trautman (JIRA)
Add log4j diagnostic context filter to Seam logging package
-----------------------------------------------------------
Key: JBSEAM-1610
URL: http://jira.jboss.com/jira/browse/JBSEAM-1610
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Eric Trautman
Consider adding a web filter that populates the log4j mapped diagnostic context with the identity username.
Thanks,
Eric Trautman
Here is an example of what I am currently using:
/**
* This filter adds the authenticated user name to the log4j
* mapped diagnostic context so that it can be included in
* formatted log output if desired.
*/
@Startup
@Scope(ScopeType.APPLICATION)
@Name("org.jboss.seam.web.loggingContextFilter")
@Intercept(InterceptionType.NEVER)
@Install
public class LoggingContextFilter extends AbstractFilter {
/** Identifier for the username "diagnostic context". */
public static final String USERNAME_CONTEXT = "username";
public void doFilter(ServletRequest servletRequest,
ServletResponse servletResponse,
FilterChain filterChain)
throws IOException, ServletException {
if (servletRequest instanceof HttpServletRequest) {
HttpServletRequest req = (HttpServletRequest) servletRequest;
if (matchesRequestPath(req)) {
HttpSession session = req.getSession();
Object o = session.getAttribute("org.jboss.seam.security.identity");
if (o instanceof Identity) {
Identity identity = (Identity) o;
String username = identity.getUsername();
if (username != null) {
MDC.put(USERNAME_CONTEXT, username);
}
}
}
}
filterChain.doFilter(servletRequest, servletResponse);
MDC.remove(USERNAME_CONTEXT);
}
}
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1605) NotLoggedInExceptions handled by the ExceptionFilter arent propegating the conversation correctly.
by Chris Rudd (JIRA)
NotLoggedInExceptions handled by the ExceptionFilter arent propegating the conversation correctly.
--------------------------------------------------------------------------------------------------
Key: JBSEAM-1605
URL: http://jira.jboss.com/jira/browse/JBSEAM-1605
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Chris Rudd
I have Login Redirection setup as specified in 13.4.5/13.4.6 of the documentation.
When the NotLoggedInException is thrown the redirection is not propagating the conversation correctly, so the return information stored in the redirect.captureCurrentView call is not available when the returnToCaptureView is executed.
NOTE: if the the login-required="true" is set for the view (instead of relying on the beans @Restrict methods) the conversation IS propagated correctly, and you are returned to the proper url after login.
This use to work correctly in 1.3.0-ALPHA. I belive the culprit may be the following line that was added in 2.0.0-BETA :
ExceptionFilter.endWebRequestAfterException line 80
FacesLifecycle.beginExceptionRecovery( facesContext.getExternalContext() );
+ Manager.instance().initializeTemporaryConversation();
try
This initializes a new conversation, and the old conversation is no longer available (known) to be propagated.
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1560) todo example fails unit test
by Norman Richards (JIRA)
todo example fails unit test
----------------------------
Key: JBSEAM-1560
URL: http://jira.jboss.com/jira/browse/JBSEAM-1560
Project: JBoss Seam
Issue Type: Bug
Reporter: Norman Richards
Priority: Blocker
It's probably just a config issue, but:
couldn't get task instances list for actor 'gavin'
org.jbpm.JbpmException: couldn't get task instances list for actor 'gavin'
at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:65)
at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:189)
at org.jboss.seam.bpm.TaskInstanceList.getTaskInstanceList(TaskInstanceList.java:40)
at org.jboss.seam.bpm.TaskInstanceList.getTaskInstanceList(TaskInstanceList.java:33)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
at org.jboss.seam.util.Work.workInTransaction(Work.java:39)
at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
at org.jboss.seam.bpm.TaskInstanceList_$$_javassist_84.getTaskInstanceList(TaskInstanceList_$$_javassist_84.java)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
at org.jboss.seam.Component.unwrap(Component.java:1983)
at org.jboss.seam.Component.getInstance(Component.java:1770)
at org.jboss.seam.Component.getInstance(Component.java:1723)
at org.jboss.seam.Component.getInstance(Component.java:1702)
at org.jboss.seam.Component.getInstance(Component.java:1697)
at org.jboss.seam.mock.BaseSeamTest.getInstance(BaseSeamTest.java:82)
at org.jboss.seam.example.todo.test.TodoTest.access$000(TodoTest.java:12)
at org.jboss.seam.example.todo.test.TodoTest$1.renderResponse(TodoTest.java:39)
at org.jboss.seam.mock.BaseSeamTest$Request.renderResponsePhase(BaseSeamTest.java:583)
at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:569)
at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:487)
at org.jboss.seam.example.todo.test.TodoTest.testTodo(TodoTest.java:21)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2214)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:61)
... 65 more
Caused by: java.sql.SQLException: Column not found: TASKINSTAN0_.VERSION_ in statement [select taskinstan0_.ID_ as ID1_23_, taskinstan0_.VERSION_ as VERSION3_23_, taskinstan0_.NAME_ as NAME4_23_, taskinstan0_.DESCRIPTION_ as DESCRIPT5_23_, taskinstan0_.ACTORID_ as ACTORID6_23_, taskinstan0_.CREATE_ as CREATE7_23_, taskinstan0_.START_ as START8_23_, taskinstan0_.END_ as END9_23_, taskinstan0_.DUEDATE_ as DUEDATE10_23_, taskinstan0_.PRIORITY_ as PRIORITY11_23_, taskinstan0_.ISCANCELLED_ as ISCANCE12_23_, taskinstan0_.ISSUSPENDED_ as ISSUSPE13_23_, taskinstan0_.ISOPEN_ as ISOPEN14_23_, taskinstan0_.ISSIGNALLING_ as ISSIGNA15_23_, taskinstan0_.ISBLOCKING_ as ISBLOCKING16_23_, taskinstan0_.TASK_ as TASK17_23_, taskinstan0_.TOKEN_ as TOKEN18_23_, taskinstan0_.PROCINST_ as PROCINST19_23_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN20_23_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM21_23_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_=? and taskinstan0_.ISSUSPENDED_<>1 and taskinstan0_.ISOPEN_=1]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:386)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:374)
at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:187)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:497)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:415)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
... 73 more
... Removed 30 stack frames
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1061) Support EL expressions in remoting calls
by Shane Bryzak (JIRA)
Support EL expressions in remoting calls
----------------------------------------
Key: JBSEAM-1061
URL: http://jira.jboss.com/jira/browse/JBSEAM-1061
Project: JBoss Seam
Issue Type: Feature Request
Components: Remoting
Reporter: Shane Bryzak
Assigned To: Shane Bryzak
Priority: Minor
It would be really cool to tie in EL expressions directly with Seam remoting. For example, take this method call:
Seam.Component.getInstance("helloAction").sayHello(nameValue, sayHelloCallback);
instead, this could be rewritten (and tied into the page context) like this:
Seam.Remoting.pageContext.set("name", nameValue);
Seam.Remoting.evaluate("#{helloAction.sayHello(name)}", sayHelloCallback);
This is not a perfect example, however it demonstrates the potential of this feature. Plus it makes remoting more consistent with the rest of Seam.
--
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, 8 months