[Installation, Configuration & DEPLOYMENT] - Log4j keeps on logging on STDOUT
by stlecho
Hi,
Our application is based on the Spring framework and deployed in JBoss v4.0.2-GA. The logging aspects of the application are configured with an application-specific log4j.xml. This file is initialized with the Log4JConfigurer Spring bean and contains an ERROR level for the org.hibernate category.
The JBoss log4j.xml file defined in server/default/conf contains by default a CONSOLE appender. I have removed this appender and all usages of it. This file contains no org.hibernate category.
Although the level for the org.hibernate category is defined as ERROR, I remark that there are Hibernate logs on STDOUT:
2007-11-30 10:23:54,237 INFO [JMS SessionPool Worker-1] [STDOUT:152] Hibernate: select officeimpl0_.id as id18_, officeimpl0_.officeNr as officeNr18_, officeimpl0_.timestamp as timestamp18_ from T_Office officeimpl0_ where officeimpl0_.officeNr=?
I have no idea how these Hibernate loggings are injected trough STDOUT into the application-specific log file. Is there an explanation for this - from my point of view - rather strange behavior ?
Regards, Stefan Lecho.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109225#4109225
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109225
18 years, 4 months
[JBoss Seam] - Hessian Support
by ralscha
Hello
The last couple of days I wrote a HessianResource class so a hessian client can talk to a seam application. I would like to share this code with the community. It's very experimental right now. Maybe some Seam gurus can review the code and give me some advice what could be done better. Currently there is no support for conversationId. The hessian protocol allows to send header information with the request and response. This could be a solution to send an id to a client and back to the server. But it looks like that the class HessianProxy does not support header informationen.
You can download the class from here http://dev.ess.ch/hessianRiaDemo/HessianResource.java
Here are the steps to configure a seam application with this resource
1. Put the HessianResource in your source directory
2. In the web.xml you have to configure the Seam Resource Servlet
< servlet >
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
</ servlet >
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
3. Create an interface
public interface BasicAPI {
String hello();
}
4. Create an implementation
@Name("hello")
public class HelloWorld implements BasicAPI {
@Override
public String hello() {
return "Hello from a Seam Component";
}
}
5. Now you can start the web application
6. Create a client program and call the component. The url is http://server_ip:port/contextNameOfWebapplication/seam/resource/hessian/b...
beanName is the same string you use in @Name("beanName")
public class Client {
public static void main(String[] args) {
try {
String url = "http://localhost:8080/sandbox/seam/resource/hessian/hello";
HessianProxyFactory factory = new HessianProxyFactory();
BasicAPI basic = (BasicAPI) factory.create(BasicAPI.class, url);
System.out.println("hello(): " + basic.hello());
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}
I created a "seamified" version of the Caucho Words Demo too.
Here is the live demo: http://dev.ess.ch/hessianRiaDemo
and here is the source code: http://dev.ess.ch/hessianRiaDemo/HessianRiaSeamDemo.zip
Regards
Ralph
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109219#4109219
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109219
18 years, 4 months