[JBossWS] - log4j and Jboss-4.0.5 GA
by lluo
I start to use JBoss and have a question on using log4j in JBoss-4.0.5 environment. In my web application /WEB-INF/class foler, I have "log4j.properties" file as follows:
# Set root logger level to error, and specify a file appender
log4j.rootLogger=error, File
###### File appender definition #######
log4j.appender.File=org.apache.log4j.RollingFileAppender
log4j.appender.File.File=c:/logs/myApp.log
log4j.appender.File.MaxFileSize=50MB
log4j.appender.File.MaxBackupIndex=1
log4j.appender.File.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.File.layout.ConversionPattern=%d{MM/dd/yyyy HH:mm:ss z} %-5p [%c(1)] (%F:%L) %m%n
log4j.logger.com.covisint.hie=DEBUG
But in the log, the message are shown as follows:
01/02/2007 14:29:31 EST DEBUG [Welcome] (Log4JLogger.java:84) forward to "Welcome.jsp"
The file name (Welcome.java) and its line number are not being shown. correctly. Are there some configuration steps I have missed?
Thanks,
Laiwu Luo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997351#3997351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997351
19 years, 3 months
[JBoss Seam] - Does SeamTest.invokeMethod work with parameters in your EL e
by costeen21
I'm trying to write a test that uses the invokeMethod function with a parameter passed into it. Similiar to the following:
String id = new FacesRequest("/myPage.xhtml")
| {
| @Override @SuppressWarnings("deprecation")
| protected void updateModelValues() throws Exception
| {
| setValue("#{myBean}", myBean);
| }
|
| @Override
| protected void invokeApplication()
| {
| assert invokeMethod("#{myAction.myMethod(myBean)}")=="Success";
| }
| }.run();
|
Should this work? I see that SeamTest.invokeMethod makes the following call (notice args is set to null) :
| protected Object invokeMethod(String methodExpression)
| {
| return application.createMethodBinding(methodExpression, null).invoke(facesContext, null);
| }
|
MockApplication.createMethodBinding then makes the following call:
| @Override
| public MethodBinding createMethodBinding(final String methodExpression, final Class[] args)
| throws ReferenceSyntaxException {
| return new UnifiedELMethodBinding(methodExpression, args);
| }
|
Then UnifiedELMethodBinding calls
| public UnifiedELMethodBinding(String expression, Class[] args)
| {
| me = EXPRESSION_FACTORY.createMethodExpression(EL_CONTEXT, expression, Object.class, args);
| }
EXPRESSION_FACTORY is set to com.sun.el.ExpressionFactoryImpl which does not seem to be available with a simple Google search...(I'm still looking for it).
So, invokeMethod is calling createMethodBinding with args set to null. At this point should the parameters be parsed out and passed into createMethodBinding in args or will com.sun.el.ExpressionFactoryImpl parsed the expression properly.
I don't think SeamExpressionFactory is being used. If it was...it looks from the code like this would work.
Thanks...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997350#3997350
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997350
19 years, 3 months