[JBoss Seam] - Re: Using log4j's NDC
by atalaat
Try adding a servlet Filter, which manages the NDC per request:
private static final AtomicLong requestCount = new AtomicLong(0L);
public void doFilter(ServletRequest req, ServletResponse resp,
FilterChain chain) throws ServletException, IOException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
// Retrieve the HttpSession. Create a new one if it does not exist.
HttpSession session = request.getSession(true);
String sessionId = session.getId();
try {
NDC.push(sessionId + ";" + requestCount.getAndIncrement());
chain.doFilter(request, response);
}
finally {
log.debug("Finished servicing request.");
NDC.pop();
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056171#4056171
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056171
18Â years, 10Â months
[JBossWS] - JBoss 4.0.5.GA web services
by ravi2box
Hi,
I'd like to know if it's possible to produce and consume web services on the vanilla (i.e without separately downloading JBossWS libs) version of JBoss 4.0.5GA . If i understand this correctly, JBoss 4.0.5GA ships with jbossws-1.0.3 SP1
I am trying to write a simple JSR 181 style web service using the @WebService and @WebMethod annotation. I am using JDK 1.5.0_12 on Windows XP. I am getting a compilation error
testws\service\HelloWS.java:8: incompatible types
[javac] found : javax.jws.WebService
[javac] required: java.lang.annotation.Annotation
[javac] @WebService
[javac] ^
[javac] testws\service\HelloWS.java:11: incompatible types
[javac] found : javax.jws.WebMethod
[javac] required: java.lang.annotation.Annotation
[javac] @WebMethod
[javac] ^
[javac] 2 errors
BUILD FAILED
Compile failed; see the compiler error out
put for details.
I see that the jbossws14.sar file has JDK 1.4 compatible JARS - does this mean it won't compile on JDK 1.5?? I have JBOSS_HOME/client and server/default/lib in the classpath already...what other JAR am i missing??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056164#4056164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056164
18Â years, 10Â months