Java on HP-UX 11i Frequently Asked Questions
Q: Is there a way to know the value of maximum stack size consumed?
A: There isn't a straightforward way to do this, however, there is a way using HP
OpenView GlancePlus. GlancePlus has a function that reports the memory utilization
for the memory mapped regions. First, select the process you want to monitor, then
select Process Memory Regions. Isolate the regions allocated for the individual threads
by looking for regions whose VSS value matches the value currently defined for -Xss.
Once found, look at the values of the RSS for these regions and you can get a picture
of what each thread is consuming. If you don't have too many threads, you should be
able to find out quickly the largest thread stack utilization. You could possibly write
a script to process this information.
Q: Does Java provide a way to catch signals?
A: No, Java doesn't have any model for a signal in the virtual machine. The JVM uses
signals internally for its operation and so native methods should generally avoid
attempting to send signals or install handlers for signals. In a simple case such as
catching a CNTL C and doing a cleanup, you could launch Java from within a Perl
script. The Perl script can catch the CNTL C and then signal the JVM by writing to a
socket. The application needs to be written so that it is listening on that socket for the
signal.
Q: What is the range of priorities offered by SCHED_TIMESHARE policy, and how is
Java priority level mapped to them?
A: In the native-threaded JVM, we basically map the range
(java.lang.Thread.MIN_PRIORITY-1..java.lang.Thread.MAX_PRIORITY) to the range
determined by calling sched_get_priority_min() and
sched_get_priority_max() for the SCHED_OTHER (also known as
SCHED_TIMESHARE or SCHED_HPUX) policy. However, because non-privileged
applications cannot raise the priority of threads, we only do this priority mapping for
applications running as users with sufficient privileges to raise priorities or be a member
of group PRIV_RTSCHED. For all other applications, the native-threaded JVM effectively
ignores the Java thread priorities and all native threads are created with identical
priorities.
Q: Where can I learn more about JDBC?
A: See Oracle's Java SE Technologies Database page for current information on JDBC.
Also see the JDBC books and reference page, and read JDBC Database Access with Java
by Graham Hamilton, R.G.G. Cattell, and Maydene Fisher, published by
Addison-Wesley.
The reference implementations from Oracle are the base for HP's products for Java.
The Solaris implementation from Oracle is subjected to additional engineering to give
them some additional features and additional testing to ensure their product's quality.
Technical Questions 9