A pretty good article on 1.4.1 GC from JavaWorld.
Other 1.4.1 GC Tutorials:
1. From java.sun.com.
2. From Wireless Java. Note that this replaces the famous GC Article for 1.2.2
3. From JavaPerformanceTuning.
Some Benchmarks:
1. From JavaLobby.
2. From NetBeans.
Friday, March 07, 2003
J2SE: 1.4.1 boosts garbage collection
Posted by Kumar at 6:10 PM 0 comments
Wednesday, March 05, 2003
JSF: EA3 Released
JavaServer Faces Early Access 3 has been posted at java.sun.com. Tutorial for JSF is available here.
Posted by Kumar at 10:03 PM 0 comments
Weblogic: Starting ManagedServer Programmatically
Weblogic6.1 Node Manager do *not* attempt to restart a Managed Server when its goes down or provide a mechanism where user can use some compand line tool to start the managed server using Node Manager. The following is the example code to start a managed server using nodemanager programmatically. This code when used in combination with script that detects when a server goes down (Example: SNMP management tools which get a trap when managed server goes down), will automate server restart when a problem occurs.
Tested with weblogic6.1SP4.
|
Starting weblogic7 Node Manager attempts to restart a Managed Server whose health state is "failed".
Posted by Kumar at 5:20 PM 0 comments
Monday, March 03, 2003
General: Redirecting Std err
Most Java Programmers I know are unaware of how to redirect Stderr to a file. Here is a 1 minute tutorial on the same. For both Unix and Windows:
When writing shell scripts, you can control input/output redirection. Input redirection is the ability to force a command to read any necessary input from a file instead of from the keyboard. Output redirection is the ability to send the output from a command into a file or pipe instead of to the screen.
Each process created by a shell script begins with three file descriptors associated with it:
0 stdin |
1 stdout |
2 stderr |
You can use the file descriptor numbers 0 (standard input), 1 (standard output), and 2 (standard error) together with the redirection metacharacters to control input and output in the Bourne and Korn shells.
Description | Command | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Take STDIN from file | <file, or 0<file | ||||||||||||||||
Redirect STDOUT to file | > file, or 1>fileRedirect STDERR to file | 2> file | Append STDOUT to end of file | >> file | Redirect STDERR to STDOUT | 2>&1 | Pipe standard output of cmd1 as standard input to cmd2 | cmd1 | cmd2 | Use file as both STDIN and STDOUT | <> file | Close STDIN | <&- | Close STDOUT | >&- | Close STDERR | 2>&- | |
When redirecting STDIN and STDOUT in the Bourne and Korn shells, you can omit the file descriptors 0 and 1 from the redirection symbols. You must always use the file descriptor 2 with the redirection symbol.
The 0 and 1 file descriptors are implied, and not used explicitly for the C shell. The C shell representation for standard error (2) is an ampersand (&). STDERR can only be redirected when redirecting STDOUT.
Description | Command |
---|---|
Redirect STDOUT to file | > file |
Take input from file | < file |
Append STDOUT to end of file | >> file |
Redirect STDOUT and STDERR to file | >& file |
Append STDOUT and STDERR to file | >>& file |
For windows:
The command shell provides facilities to change the default stream input and output. These facilities are accessed by placing special command redirection symbols in a command.
Symbol | Description |
---|---|
>file | Redirects command output to the file specified. You can also use a standard device name such as LPT1, CON, PRN or CONOUT$ as the file name. Any preexisting contents of the file are lost. |
>>file | Redirects command output to the file specified. If the file already exists, all command output is appended to the end of the file. |
<file | Redirects command input from the file specified. You can also use a standard device name such as CON or CONIN$. |
2>file | Redirects command error output to the file specified. You can also use a standard device name such as LPT1, CON, PRN or CONOUT$ as the file name. Any preexisting contents of the file are lost. |
2>&1 | Redirects command error output to the same location as command output. This makes any command output redirection also apply to command error output. |
cmd1 | cmd2 | Pipes the command output of cmd1 to the command input of cmd2. Multiple pipe characters are allowed, creating a chain of commands, each sending output to the next command in the chain. |
Posted by Kumar at 9:16 PM 0 comments