Java Technology Update Knowledge Base Computer Education CETi
Java Technology Update
There are a variety of new Java language features:
- Enhanced for Loop.
- Annotation processing which is used for turning off
compiler warnings at a class or method level; they also are
useful in other situations.
- Enums as a major improvement over ints in
terms of type safety.
- Utilization of varargs for cleaning
up ugly code.
- Use of covariant returns in order to
avoid casts when an implementation's return type is known to be more
specific than the APIs.
- Using Covariant Return Types which allows
the creation of methods in a subclass that returns an object whose type is a
subtype of that returned by the method it overrides.
- Utilization of generic methods, in addition to generic types.
SYS-ED's workshops explain and demonstrate:
- How annotations work best for frameworks
like EJB and web
services, when behavior is not directly modified. This will be valuable when adding boilerplate code.
- How to correctly pass in many instances of
the same object type to a method, without knowing at compile time how many
instances there will be.
- How type safety is a major improvement over ints.
- How
mistakes can be prevented in which one type of enum will be used in place of another.
Java for CICS
Java is also increasingly being utilized in the
IBM mainframe environment. However, there are issues when running Java
applications under CICS Transaction Server and coding using
WSAD (first generation) and
Rational Z (new).
SYS-ED's workshops explain and demonstrate:
- That the profile directory must be specified
in the SIT parameter JVMPROFILEDIR.
- That the SIT parameter points to a directory
containing the profile files specified in the Java program definition. CICS
passes values in the profile to the JVM: Java Virtual Machine when a
transaction invokes a Java program.
- The important values in the profiles such as
the directory for CICS Java classes, directory for Java, LIBPATH for
additional executables, file names for STDOUT and STDERR ( in place of the
default), and CLASSPATH for the Java programs to be run.
- Creating separate CICS class directories for
each maintenance level of CICS, then build a process to change the
CICS_DIRECTORY parameter in the JVM profiles.
- CICS does not support the 64 bit JVM and when
the 64 bit JVM is the default the, the 31 bit JVM will have to be placed in
its directory in the profile.
- That case must be preserved when changing the
SIT: system initialization table or SIT overrides.