<< Back to previous view

[GLASSFISH-19156] Handle Throwable parameter in logging calls Created: 15/Oct/12  Updated: 16/Jan/13  Resolved: 16/Jan/13

Status: Resolved
Project: glassfish
Component/s: logging
Affects Version/s: 4.0_b01
Fix Version/s: 4.0_b71

Type: Improvement Priority: Major
Reporter: rajendra_inamdar Assignee: sandeep.shrivastava
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: EE7_GF4
Participants: rajendra_inamdar, sandeep.shrivastava and Sanjeeb Sahoo

 Description   

We need a way to pass Throwable in a localized log call and print the stack trace in the log file. The usage will be something like:

@LogMessageInfo(message = "Error unbinding ejb bundle [{0}] dependency namespace")
public static final String EJB_ERROR_UNBINDING_BUNDLE = "AS-EJB-00003"

Object params[] = { ejbBundle.getModuleName(), e }; // pass Throwable as the last parameter
_logger.log( Level.WARNING, EJB_ERROR_UNBINDING_BUNDLE, params);

The formatter should handle the Throwable (passed as a last parameter) in a way so that the stacktrace is printed in the log file.



 Comments   
Comment by sandeep.shrivastava [ 24/Oct/12 11:37 AM ]

This issue is now fixed with revision svn revision #56710.

Comment by sandeep.shrivastava [ 24/Oct/12 11:42 AM ]

Users should now be able to pass in a Throwable as the last param in the log method invocation and it will appear in the log message body.

@LogMessageInfo(message = "Cannot read test configuration file {0}", level="SEVERE",
cause="An exception has occurred while reading the logging configuration file.",
action="Take appropriate action based on the exception message.")
public static final String ERROR_READING_TEST_CONF_FILE = "TEST-LOGGING-00001";

LOGGER.log(Level.SEVERE, ERROR_READING_TEST_CONF_FILE,
new Object[] {TEST_CONF_FILE, new Exception(TEST_EXCEPTION_MESSAGE)});

Comment by Sanjeeb Sahoo [ 10/Jan/13 05:50 AM ]

This fix should be rolledback. Any behavior which is not guaranteed by JUL will cause our code to behave differently when it gets embedded in other environment which may not have the JUL extensions installed. We may not even have the opportunity to install JUL extensions as the embedder decides the platform.

Comment by sandeep.shrivastava [ 16/Jan/13 01:12 PM ]

The formatter enhancement has been rolled back and there is a LogHelper API provided. This is submitted via change 58568.





[EL_SPEC-6] Rewrite the spec for collection support Created: 31/Oct/12  Updated: 14/Mar/13  Resolved: 14/Mar/13

Status: Resolved
Project: el-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: kchung Assignee: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: EE7_GF4
Participants: kchung

 Description   

The EL spec needs to align with Java Se8 regarding the support for collection operators. The part about LINQ operator needs to be removed, and replace with similar operations in SE 8.

The operators also need to be implemented.



 Comments   
Comment by kchung [ 14/Mar/13 05:55 PM ]

fixed.





Generated at Fri Apr 18 14:56:33 UTC 2014 using JIRA 4.0.2#472.