In the previous sections of this chapter, we discussed the new Java EE 6, but how do we get it to work under our new WebLogic 12c Server?
In WebLogic Server 12c, you can make use of the shared Java EE library feature in WebLogic Server which provides an easy way to share one or more different types of modules among multiple enterprise applications. A shared library is a single module or collection of modules that is registered with the Java EE application container upon deployment. A shared library could be:
You should package a shared library into your built and compiled archive file (EAR, JAR, or WAR). However, you may also choose to deploy shared as exploded archive directories to facilitate repeated updates and redeployments (for development purposes).
After the library has been registered, you can deploy applications which refer to the library. Each referencing application receives a reference to the required library on deployment, and can use the modules that make up the library as if they were packaged as part of the referencing application itself. The library classes are added to the classpath of the referencing application, and the referencing application's deployment descriptors are merged (in memory) with those of the modules that make up the shared Java EE library.
There are some things to keep in mind while using shared libraries. If you develop shared Java EE libraries and optional packages, follow these rules:
/lib
subdirectory instead of using the shared Java EE libraries or optional packages. Classes in the /lib
subdirectory are made available (within a separate system-level classloader) to all Java EE applications running on WebLogic Server. context-root
element in the EAR's weblogic-application.xml
deployment descriptor to override the library's context root.One of the nice things about the new WebLogic 12c is that you don't have to recompile or rebuild its previous application classes or libraries.
With one exception, upgrading to WebLogic Server 12c Release 1 (12.1.1) does not require you to recompile applications in order to create new generated classes.
The only exception here is the EJBGen utility. The current version of the EJBGen utility recognizes only JDK 5.0 or later metadata annotation-style EJBGen tags and not the old Javadoc-style tags. This means that source files that use the Javadoc-style tags must be upgraded to use the equivalent annotation, and then recompiled using the updated version of EJBGen.
So how does Java EE 6 fit in to Cloud Technology?
The WebLogic 12c has been utilized for Oracle technical solutions for the cloud, Engineered Systems or better called Exalogic. Applications running in the cloud with the Java EE S6 specifications have:
18.189.186.167