Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to deploy ejb's in weblogic?  RSS feed

 
Yan Lee
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I have a simple stateless session bean that has 1 method that says hello.
I have created the remote and home intefaces, ejb-jar.xml,weblog-ejb-jar.xml, application.xml based on the templates put in weblogic samples.
I have replicated the build.xml file and managed to create an .ear and client.jar file for my app. What do I need to do to deploy these ejb's in weblogic 7.0?
Thanks.
 
Ade Barkah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a few ways:
1) If your server is running in "development mode" (most likely it is) then you can simply copy the EAR into the domain's /applications directory and Weblogic will auto-deploy it (and run ejbc if needed.)
2) You can also deploy the EAR from the administrative console. Log in into the console (e.g. http://localhost:7001/console), look for the Deployments folder under the domain, click on Applications, and select "Configure new Application"
3) You can use the weblogic.Deployer (java tool) available in weblogic.jar. Eg. "java -cp weblogic.jar weblogic.Deployer -activate -name MyJar -source /path/to/MyJar.ear -target cgServer"
4) If you use Ant, there is a corresponding weblogic.Deployer Ant task called wldeploy. (Or you can just use Ant to copy the EAR into /applications as #1 above.)
5) If you load your project into Workshop, then Workshop can automatically deploy your application and as a bonus, debug it remotely.
HTH,
-Ade Barkah
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!