Writing WebLogic 12c based EJB 3.0 project and Standalone client using Maven Build

Datetime:2016-08-23 01:57:48          Topic: EJB           Share

Hi,

As part of this demo we will see how to write a fully maven based WebLogic12c deployable application which will contain an EJB Project which we will deploy on WebLogic using the 12c specific maven plugin “wls-maven-plugin”. In the same sample we will use the “exec-maven-plugin” plugin as well to run our Remote Weblogic EJB Client code.

As part of this code was we will learn the following things:

1). Writing a simple EJB EAR project using Maven.

2). Deploying the EAR project on WebLogic 12c using “wls-maven-plugin”

3). Running a Simple EJB Client code with the help of “exec-maven-plugin”

So lets begin with writing the EJB Project.

Developing EJB Project

Step-1).First of all lets make a directory “WebLogic_EJB_Demo_Using_Maven” where we will keep both our “EJB_Project” and “EJB_Client_Project”.

$ mkdir /WebLogic_EJB_Demo_Using_Maven
    $ mkdir -p /WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/src/main/application/META-INF
    $ mkdir -p /WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/src/main/java/ejb3

Step-2).Now we will write the “HelloRemote.java”, the remote interface of our Stateless EJB, Inside the “EJB_Project/TestEJB/src/main/java/ejb3”.

package ejb3;
import javax.ejb.*;
@Remote
public interface HelloRemote {
        public String sayHello(String name);
}

Step-3).Similarly we will write the Stateless Bean “HelloBean.java” inside the “EJB_Project/TestEJB/src/main/java/ejb3” as following

package ejb3;
import javax.ejb.*;
@Stateless
public class HelloBean implements HelloRemote {
        public String sayHello(String name) {
           System.out.println("\n\t hello("+name+") invoked, Hello HelloBean Date:  "+new java.util.Date());
           return "Hello, "+name+", Date: "+new java.util.Date();
        }
 }

Step-4).Now we will write the most important part. So lets create a maven build the file “pom.xml” inside the “/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB” directory.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<parent>
		<groupId>middleware.magic</groupId>
		<artifactId>WebLogic12_EJB_Demo_With_Maven</artifactId>
		<version>1.0</version>
	</parent>
	<properties>
		<ear.app.name>TestApp</ear.app.name>
		<ejb.jar.name>TestEJB</ejb.jar.name>
	</properties>
	<modelVersion>4.0.0</modelVersion>
	<groupId>middleware.magic</groupId>
	<artifactId>TestEJB</artifactId>
	<version>1.0</version>
	<packaging>ejb</packaging>
	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.0</version>
		</dependency>
		<dependency>
			<groupId>javax.ejb</groupId>
			<artifactId>ejb-api</artifactId>
			<version>3.0</version>
			<scope>provided</scope>			
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-ejb-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<ejbVersion>3.0</ejbVersion>
					<archive>
						<manifest>
							<useUniqueVersions>false</useUniqueVersions>
							<addClasspath>false</addClasspath>
						</manifest>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

Step-5).Similarly we will write another “pom.xml” inside the “/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp” as following:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>middleware.magic</groupId>
		<artifactId>WebLogic12_EJB_Demo_With_Maven</artifactId>
		<version>1.0</version>
	</parent>
	<properties>
		<ear.app.name>TestApp</ear.app.name>
		<ejb.jar.name>TestEJB</ejb.jar.name>
	</properties>
	<groupId>middleware.magic</groupId>
	<artifactId>TestApp</artifactId>
	<name>${artifactId}</name>
	<version>1.0</version>
	<packaging>ear</packaging>
	<dependencies>
		<dependency>
			<groupId>middleware.magic</groupId>
			<artifactId>TestEJB</artifactId>
			<version>1.0</version>
			<type>ejb</type>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-ear-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<applicationName>${artifactId}</applicationName>
					<finalName>${ear.app.name}</finalName>
					<version>6</version>
					<defaultLibBundleDir>lib</defaultLibBundleDir>
					<fileNameMapping>no-version</fileNameMapping>
					<skinnyWars>true</skinnyWars>
					<modules>
						<ejbModule>
							<groupId>middleware.magic</groupId>
							<artifactId>${ejb.jar.name}</artifactId>
						</ejbModule>
					</modules>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

Step-6).So far we have written the child project pom.xml, Now lets write the main “pom.xml” file inside the “/WebLogic_EJB_Demo_Using_Maven/EJB_Project” as following:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>middleware.magic</groupId>
    <artifactId>WebLogic12_EJB_Demo_With_Maven</artifactId>
    <version>1.0</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.7</java.version>
        <middleware.home>/PATH/TO/Installed/wls12130</middleware.home>  <!— CHANGE ME!!! —>
   	<admin.server.url>t3://localhost:7001</admin.server.url>  <!— CHANGE ME!!! —>
        <admin.username>weblogic</admin.username>                 <!— CHANGE ME!!! —>
        <admin.password>weblogic1</admin.password>                <!— CHANGE ME!!! —>
        <ear.app.name>TestApp</ear.app.name>                      
        <ejb.jar.name>TestEJB</ejb.jar.name>                       
    </properties>
    
    <modules>
        <module>${ejb.jar.name}</module>
        <module>${ear.app.name}</module>
    </modules>
    
    
    <dependencies>
      <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  
  
    <build>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>2.3.2</version>
               <configuration>
                  <source>1.7</source>
                  <target>1.7</target>
               </configuration>
            </plugin>

            <plugin>
               <groupId>com.oracle.weblogic</groupId> 
               <artifactId>wls-maven-plugin</artifactId> 
               <version>12.1.3.0</version> 
               <configuration> 
                 <middlewareHome>${middleware.home}</middlewareHome>
                 <adminurl>${admin.server.url}</adminurl>
                 <user>${admin.username}</user>
                 <password>${admin.password}</password>
                 <name>${ear.app.name}</name>
                 <source>${ear.app.name}/target/${ear.app.name}.ear</source>          
               </configuration> 
            </plugin>  
         </plugins>
     </build>
     
</project>

Step-7).Now lets start the WebLogic server and then deploy the EJB project. In order to deploy the EJB Project, Open a terminal and then run the following commands. The Maven plugin will build the EAR containing the EJB as well as it will deploy it to WebLogic server.

For Unix Based OS

$ export M2_HOME=/PATH/TO/apache_maven_3.2.3
$ export JAVA_HOME=/PATH/TO/jdk1.8.0_60
$ export PATH=$JAVA_HOME/bin:/PATH/TO/apache_maven_3.2.3/bin:$PATH

$ cd /WebLogic_EJB_Demo_Using_Maven/EJB_Project
$ mvn clean install wls:deploy

For Windows Based OS

$ set M2_HOME=C:\PATH\TO\apache_maven_3.2.3
$ set JAVA_HOME=C:\PATH\TO\jdk1.8.0_60
$ set PATH=%JAVA_HOME%/bin;C:\PATH\TO\apache_maven_3.2.3\bin;%PATH%

$ cd C:\WebLogic_EJB_Demo_Using_Maven\EJB_Project
$ mvn clean install wls:deploy

In case if you face any error / exception while running the WebLogic 12c Maven plugin “wls-maven-plugin” then please refer to the article:

http://middlewaremagic.com/weblogic/?p=8217

RAW Output of EJB Project Build and Deployment

$ mvn clean install wls:deploy
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for middleware.magic:TestApp:ear:1.0
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] WebLogic12_EJB_Demo_With_Maven
[INFO] TestEJB
[INFO] TestApp
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building WebLogic12_EJB_Demo_With_Maven 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ WebLogic12_EJB_Demo_With_Maven ---
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ WebLogic12_EJB_Demo_With_Maven ---
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/pom.xml to /Users/jsensharma/.m2/repository/middleware/magic/WebLogic12_EJB_Demo_With_Maven/1.0/WebLogic12_EJB_Demo_With_Maven-1.0.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building TestEJB 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ TestEJB ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestEJB ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ TestEJB ---
[INFO] Compiling 2 source files to /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ TestEJB ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ TestEJB ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ TestEJB ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-ejb-plugin:2.3:ejb (default-ejb) @ TestEJB ---
[INFO] Building EJB TestEJB-1.0 with EJB version 3.0
[INFO] Building jar: /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/target/TestEJB-1.0.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ TestEJB ---
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/target/TestEJB-1.0.jar to /Users/jsensharma/.m2/repository/middleware/magic/TestEJB/1.0/TestEJB-1.0.jar
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestEJB/pom.xml to /Users/jsensharma/.m2/repository/middleware/magic/TestEJB/1.0/TestEJB-1.0.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building TestApp 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ TestApp ---
[INFO] Deleting /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target
[INFO] 
[INFO] --- maven-ear-plugin:2.9:generate-application-xml (default-generate-application-xml) @ TestApp ---
[INFO] Generating application.xml
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ TestApp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/src/main/resources
[INFO] 
[INFO] --- maven-ear-plugin:2.9:ear (default-ear) @ TestApp ---
[INFO] Copying artifact [ejb:middleware.magic:TestEJB:1.0] to [TestEJB.jar]
[INFO] Building zip: /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target/TestApp-1.0/TestEJB.jar
[INFO] Copying artifact [jar:org.slf4j:slf4j-api:1.7.0] to [lib/slf4j-api.jar]
[INFO] Copy ear sources to /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target/TestApp-1.0
[INFO] Could not find manifest file: /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target/TestApp-1.0/META-INF/MANIFEST.MF - Generating one
[INFO] Building jar: /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target/TestApp.ear
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ TestApp ---
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target/TestApp.ear to /Users/jsensharma/.m2/repository/middleware/magic/TestApp/1.0/TestApp-1.0.ear
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/pom.xml to /Users/jsensharma/.m2/repository/middleware/magic/TestApp/1.0/TestApp-1.0.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building WebLogic12_EJB_Demo_With_Maven 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- wls-maven-plugin:12.1.3.0:deploy (default-cli) @ WebLogic12_EJB_Demo_With_Maven ---
[INFO] ++====================================================================++
[INFO] ++  wls-maven-plugin: deploy                                          ++
[INFO] ++====================================================================++
weblogic.Deployer invoked with options:  -noexit -adminurl t3://localhost:7001 -user weblogic -deploy -name TestApp -source TestApp/target/TestApp.ear
<Oct 29, 2015 11:02:23 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, TestApp [archive: /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Project/TestApp/target/TestApp.ear], to configured targets.> 
Task 0 initiated: [Deployer:149026]deploy application TestApp on myserver.
Task 0 completed: [Deployer:149026]deploy application TestApp on myserver.
Target state: deploy completed on Server myserver

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] WebLogic12_EJB_Demo_With_Maven ..................... SUCCESS [  2.781 s]
[INFO] TestEJB ............................................ SUCCESS [  0.824 s]
[INFO] TestApp ............................................ SUCCESS [  0.327 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.298 s
[INFO] Finished at: 2015-10-29T23:02:24+05:30
[INFO] Final Memory: 19M/310M
[INFO] ------------------------------------------------------------------------

Writing WebLogic EJB Client Code

Step-8).Now lets start writing the client project. So first of all lets make the following directories:

$ mkdir -p /WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/src/main/java/ejb3
$ mkdir -p /WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/src/main/java/client
$ mkdir -p /WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/src/main/resources

Step-9).Now lets first place the above created “HelloRemote.java” inside the “/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/src/main/java/ejb3” directory so that the client can use it.

package ejb3;
import javax.ejb.*;
@Remote
public interface HelloRemote {
        public String sayHello(String name);
}

Step-10).Now the main step of writing the EJB Client. So lets create a file “WebLogicEJBClient.java” inside the “/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/src/main/java/client” as following:

package client;
import javax.naming.*;
import java.util.*;
import ejb3.HelloRemote;
public class WebLogicEJBClient {
  public static void main(String ar[]) throws Exception {
    Context context = null;
	try {
	Properties props = new Properties();
	props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
	props.put(Context.PROVIDER_URL, "t3://localhost:7001"); 
	//props.put(Context.SECURITY_PRINCIPAL, "ejbUserOne");
	//props.put(Context.SECURITY_CREDENTIALS, "ejbPasswordOne@123");
	context = new InitialContext(props);	
	System.out.println("\n\n****************************************");
	      System.out.println("\n\t[WebLogicEJBClient] Got initial Context: "+context);	
	String EJB_JNDI_NAME="java:global/TestApp/TestEJB/HelloBean!ejb3.HelloRemote";
	HelloRemote remote = (HelloRemote) context.lookup(EJB_JNDI_NAME);
	String result = remote.sayHello("MiddlewareMagic!!!");
	System.out.println("\n\t[WebLogicEJBClient] Got response from EJB : " + result);
	System.out.println("\n****************************************\n\n");
     } catch(Exception e) {
			e.printStackTrace();
     }     
   }
}

Step-11).Now lets run the EJB Client code as following:

For Unix Based OS

$ export M2_HOME=/PATH/TO/apache_maven_3.2.3
$ export JAVA_HOME=/PATH/TO/jdk1.8.0_60
$ export PATH=$JAVA_HOME/bin:/PATH/TO/apache_maven_3.2.3/bin:$PATH

$ cd /WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project

$ mvn clean install exec:exec

For Windows Based OS

$ set M2_HOME=C:\PATH\TO\apache_maven_3.2.3
$ set JAVA_HOME=C:\PATH\TO\jdk1.8.0_60
$ set PATH=%JAVA_HOME%/bin;C:\PATH\TO\apache_maven_3.2.3\bin;%PATH%

$ cd C:\WebLogic_EJB_Demo_Using_Maven\EJB_Client_Project

$ mvn clean install exec:exec

RAW Output of Client Code Execution:

$ mvn clean install exec:exec



[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building WebLogic12_EJB_Client 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ WebLogic12_EJB_Client ---
[INFO] Deleting /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ WebLogic12_EJB_Client ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ WebLogic12_EJB_Client ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ WebLogic12_EJB_Client ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ WebLogic12_EJB_Client ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ WebLogic12_EJB_Client ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ WebLogic12_EJB_Client ---
[INFO] Building jar: /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/target/WebLogic12_EJB_Client-1.0.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ WebLogic12_EJB_Client ---
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/target/WebLogic12_EJB_Client-1.0.jar to /Users/jsensharma/.m2/repository/middleware/magic/WebLogic12_EJB_Client/1.0/WebLogic12_EJB_Client-1.0.jar
[INFO] Installing /Users/jsensharma/NotBackedUp/MM_Tests/WLS/FINAL_EJB_CAMEL/WebLogic_EJB_Demo_Using_Maven/EJB_Client_Project/pom.xml to /Users/jsensharma/.m2/repository/middleware/magic/WebLogic12_EJB_Client/1.0/WebLogic12_EJB_Client-1.0.pom
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (default-cli) @ WebLogic12_EJB_Client ---


****************************************

	[WebLogicEJBClient] Got initial Context: javax.naming.InitialContext@1889f191

	[WebLogicEJBClient] Got response from EJB : Hello, MiddlewareMagic!!!, Date: Thu Oct 29 23:02:44 IST 2015

****************************************


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.231 s
[INFO] Finished at: 2015-10-29T23:02:45+05:30
[INFO] Final Memory: 14M/245M
[INFO] ------------------------------------------------------------------------

Source Code:

The complete source code of this demo can be found at the following git repo:

https://github.com/jaysensharma/MiddlewareMagicDemos/tree/master/WebLogic/EJB/WebLogic_EJB_Demo_Using_Maven

.

.

Regards

Jay SenSharma





About List