[J2EE Design Patterns] - Exception handling in Bulk calls
by kapil.singhal
Hello,
I am using JBoss 4.0.05GA and JBossWS 1.0.3.
I have created a Web Service and I am exposing various methods at the client-end. I have provided custimozed SOAP API Exception to be thrown at the client-end in the form of code, actor, text etc. When ever any method/call is failed, an excpetion is raised.
But if a call is returning 100 values in one method (bulk call) and an exception is being raised when 90 values have been returned to the client, then how to handle the exception as I want that 90 values fetched should be returned to the client. Since in a normal scenario the values fetched does not get retained at the client-end till the method is not executed completely.
I want to retain those values which were fetched before the exception has been raised.
For e.g: The method is getting the 100 names from a database and after 90 names have been fetched, some problem occurs on the database server. The client will receive the exception as "Internal Error has occurred", but it should also get the 90 values fetched from the server.
Any help will be appreciated.
Kindly suggest.
Thanks & Regards,
Kapil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008135#4008135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008135
19 years, 2 months
[Tomcat, HTTPD, Servlets & JSP] - Logging not taking place within tomcat?
by russray
I am working with JBoss 4.0.5 and everything is working but for some reason I am not getting the logging events from the Web Server (tomcat). All my logging events from the Application server is coming in correctly.
|
| <!-- ================================= -->
| <!-- Preserve messages in a local file -->
| <!-- ================================= -->
|
| <!-- A time/date based rolling appender -->
| <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="File" value="${jboss.server.log.dir}/server.log"/>
| <param name="Append" value="false"/>
|
| <!-- Rollover at midnight each day -->
| <param name="DatePattern" value="'.'yyyy-MM-dd"/>
|
| <!-- Rollover at the top of each hour
| <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
| -->
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="[%d] [%-5p] [%c] [%m]%n"/>
| <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
| <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
| -->
| </layout>
| </appender>
|
|
|
| <!-- ===================================================== -->
| <!-- Preserve App messages in a local file Added for EXPAG -->
| <!-- ===================================================== -->
| <!-- A time/date based rolling appender -->
| <appender name="MyApp" class="org.jboss.logging.appender.DailyRollingFileAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="File" value="${jboss.server.home.dir}/log/ag.log"/>
| <param name="Append" value="false"/>
|
|
| <!-- Rollover at midnight each day -->
| <param name="DatePattern" value="'.'yyyy-MM-dd"/>
|
| <!-- Rollover at the top of each hour
| <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
| -->
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="[%d][%t] [%5p] [%m]%n"/>
| </layout>
| </appender>
|
|
|
| <!-- ============================== -->
| <!-- Append messages to the console -->
| <!-- ============================== -->
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Target" value="System.out"/>
| <param name="Threshold" value="DEBUG"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n-->
| <param name="ConversionPattern" value="[%d{ABSOLUTE}] [%-5p] [%c{1}] [%m]%n"/>
| </layout>
| </appender>
|
|
| <!-- ================ -->
| <!-- Limit categories -->
| <!-- ================ -->
|
|
| <category name="com.company">
| <priority value="DEBUG"/>
| <appender-ref ref="MyApp"/>
| <appender-ref ref="CONSOLE"/>
| </category>
|
I have looked all over this site for suggestion. I can log into my application via the web browser and I have uncommented the accesslog portion for tomcat and I and getting the log file. I am led to believe things are good with the server. It makes me suspect how I created the log4j.xml elements. I have also looked at the documentation for tomcat and it appears I have to setup logging in tomcat too?
Any suggestions would be greatly appreciated.
Russ
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008128#4008128
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008128
19 years, 2 months