was released and with it the support for perhaps the most important Java EE 7
APIs for database-backed Web Applications development. These are the specifications supported in this release:
As you can see above, WebLogic is bundled with the same implementations used by GlassFish 4.0, which gives you a compatible application server if you have already started developing Java EE 7 applications (well, of course limited to these APIs) and now seek for a commercially supported environment.
There are also some improvements in the Apache Maven Plugin, which makes developers' life much easier, allows for much better automated testing (Arquillian!), Continuous Integration and Delivery. IDEs that support Maven-based projects also benefit from this.
, now would it? So to give you a nice way to test WebLogic, I created a Dockerfile
for you to in order to create a WebLogic domain on your development environment to test it as you wish. Go to the weblogic-docker
for the Developer ZIP Distro Dockerfile
on the WebLogic Community GitHub repository
Getting started with WebLogic 12.1.3, Java EE 7, Maven, and Docker
Installing WebLogic 12.1.3 without Docker (easy)
WebLogic ZIP is very easy to install:
- Extract the content in a folder where you want to hold the wls12130 directory that comes inside the ZIP file. On my Linux machine, I use /home/bruno/Work/tools/.
- Go to the wls12130 folder and run the configure.cmd (Windows) or configure.sh (Unix).
When the installer asks you if you want to create a domain, type [Y]
Installer will ask you for username/password. On dev environments, I usually use weblogic/welcome1
Installer will start WebLogic right away and you can check it running at http://localhost:7001/console
- Creating the domain may take too long and may be seen as the installer is freezed. Make sure to configure this if you are on Linux:
$ export CONFIG_JVM_ARGS=-Djava.security.egd=file:/dev/./urandom
Installing WebLogic 12.1.3 with Docker (easier)
If you work on a Linux-based machine as your development environment and you aren't familiar with Docker
yet, check the What is Docker
, then give it a try
. Long story short: Docker is a Linux container; it is like
a virtual machine, but it is not (there are people running Docker on top of Vagrant virtual machines, for example). The most important thing for us here is that it will create a virtual network interface with a virtual IP address.
- Download the ZIP or checkout the weblogic-docker Git repository and extract somewhere on your computer. I will use $DOCKER_HOME as a reference to that location.
- Copy the wls12130_dev.zip you download previously into $DOCKER_HOME/weblogic-docker/weblogic12c-zip/
- Call the build.sh script (as sudo) and wait for Docker to do its magic
- Call dockWebLogic.sh and see WebLogic going up and running on a Docker container.
Open http://localhost:7001/console. Username/password are weblogic/welcome1
- It will attach port 7001 to your host interfaces
** Please be aware:
we don't provide support for WebLogic on Docker in any environment so use this at your own risk. The developer distribution (ZIP) is only for development environments and also unsupported, as it is not patchable
. If you still really want to run WebLogic 12c Full Distribution on top of Docker, here's a way to set it up
Configuring your local Maven repository
It is now possible to use Maven without a local installation of WebLogic, which is perfect for CI environments (Hudson/Jenkins). You will still require a installation though to set up the Maven Plugin initially, but as soon you install this to your remote Maven repository for example, other developers and CI envs won't need to have WebLogic installed locally, if deploying to a remote server. For local development, you can also point to WebLogic as a "remote" server, of course.
The steps to configure Maven are well documented and it is done by the Maven Synchronization Plug-in
. After installing it to your local repository, you can call the sync goal
to populate a local or remote repository. Here are the steps for a local environment:
- Go to the WebLogic home installation directory. For example:
$ cd /home/bruno/Work/wls12130/
- Go to the subdir
$ cd oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3/
- Execute the following command:
$ mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar
- Finally you call the push command to upload all Maven artifacts (plugins, archetypes, etc) to your repository (local in this case)
$ mvn com.oracle.maven:oracle-maven-sync:push -DoracleHome=/home/bruno/Work/wls12130/
Create Java EE applications with WebLogic Maven Archetypes
Now of course you can open this Maven project on your NetBeans
, IntelliJ IDEA, Eclipse, and then setup WebLogic in your IDE. Or you can just issue the command below to build, package, and deploy this WAR artifact to the WebLogic server you have running on your computer (either using Docker or the normal installation):
mvn package pre-integration-test
Here we make sure to use -Dupload=true since I'm not sure if you are using Docker or not. If you are, then upload
is required since the container has no access to your local file system (although possible