Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Service Bus 11g Development Cookbook

You're reading from   Oracle Service Bus 11g Development Cookbook

Arrow left icon
Product type Paperback
Published in Jan 2012
Publisher Packt
ISBN-13 9781849684446
Length 522 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (19) Chapters Close

Oracle Service Bus 11g Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Creating a basic OSB service 2. Working Efficiently with OSB Artifacts in Eclipse OEPE FREE CHAPTER 3. Messaging with JMS Transport 4. Using EJB and JEJB transport 5. Using HTTP Transport 6. Using File and Email Transports 7. Communicating with the Database 8. Communicating with SOA Suite 9. Communication, Flow Control, and Message Processing 10. Reliable Communication with the OSB 11. Handling Message-level Security Requirements 12. Handling Transport-level Security Requirements Index

Deploying the OSB configuration from Eclipse OEPE


Before we can test an OSB service, we need to deploy it to a running OSB server. Such a server can either be locally on the same machine or it can be on another, remotely accessible server. In this recipe, we will only use the functionality provided by Eclipse OEPE to deploy our service, because it's the simplest of the possible options for deployment. Of course there exists other, more automatic and repeatable ways for deployment through WLST or Apache Ant, but in this book, the deployment through Eclipse OEPE as shown here is good enough.

Getting ready

Make sure that the OSB server is running locally on your machine. The easiest way to check that it's up and running is navigating to the OSB console in a browser window. Enter the URL http://[OSBServer]:[Port]/sbconsole (replacing [OSBServer] with the name of the server and [Port] with the port of your installation) and you should get the login window of the OSB console. Check if the OSB server is up and running, especially when running the OSB on a managed server.

Make sure that the Oracle Service Bus perspective is the active one in Eclipse OEPE. The perspective is visible in the top-right corner of the Eclipse window.

Make sure that the project with the result from the previous recipe is available in Eclipse OEPE. If not then it can be imported from here: \chapter-1\getting-ready\pass-through-proxy-service-created.

How to do it...

First we need to create the server reference inside Eclipse OEPE and after that we can deploy the OSB configuration with its projects to the server.

In Eclipse OEPE, perform the following steps to create a server:

  1. Switch to the Servers tab and right-click in the empty window.

  2. Select New | Server.

  3. In the Define a New Server window, select the right WebLogic Server version (Oracle WebLogic Server 11gR1 PatchSet 3 in our case, this might vary).

  4. Click on the Next button twice.

  5. Select the Local option and select the Domain Directory of the local OSB server installation. If the Domain Directory drop-down list is empty, then click on Browse button to navigate to the domain directory on your machine:

  6. Click on the Finish button.

    Now the local OSB server is configured in Eclipse OEPE. The next step is to deploy the OSB configuration to this sever. Still in Eclipse OEPE, perform the following steps:

  7. On the Servers tab, right-click on the server item that you just created and select Add and Remove.

  8. In the Available list on the left, click on the osb-cookbook-configuration OSB configuration.

  9. Click on Add to move it to the Configured list on the right and click on the Finish button.

  10. The OSB configuration is deployed to the running OSB server and after a while the status will change from [Started] to [Started, Republish].

  11. Right-click on the OSB server and select Publish.

  12. After a while the status will change to [Started, Synchronized], indicating that Eclipse OEPE and the OSB server are synchronized.

  13. Expand the tree and the status of each single OSB project withinthe OSB configuration is shown:

The OSB configuration is now successfully deployed and ready to be used.

How it works...

Behind the scenes, Eclipse OEPE is creating a JAR file (a Java Archive) with all the artifacts which belong to the OSB configuration and deploys that archive to the OSB server.

The mechanism to deploy directly from Eclipse should only be used during development. Later when deploying to integration, quality assurance, or a production system, of course, a more automatic and reproducible way is necessary. This can be achieved through Apache Ant and WLST.

There's more...

In this section, we will show the alternative ways for deploying a project to an OSB server.

Deploying to a remote server from Eclipse OEPE

Eclipse OEPE can also be used to deploy to a remote server. Just click on the Remote option when defining the WebLogic Server in the New Server wizard:

Creating an OSB Configuration Jar and use the OSB console to deploy it

An OSB configuration can also be deployed by using the OSB console. In Eclipse OEPE, perform the following steps:

  1. In the Project Explorer, right-click on the OSB Configuration that you want to deploy to and select Export | Oracle Service Bus – Configuration Jar.

  2. In the pop-up window, select the resources to export, enter the location of the configuration jar into the Jar File field and click on the Finish button.

    In the OSB console, perform the following steps to import theConfiguration Jar that we just created:

  3. Select the menu System Administration on the left-hand side. You might have to use the scroll bar in order to see all the menu items.

  4. Click on Create in the Change Center to start a new change session.

  5. Click on the Import Resources button and use Browse to select the file created in the export (c:\temp\sbconfig.jar).

  6. Click on the Next button.

  7. Check that the right sources will be imported:

  8. Click on the Import button to start the import.

  9. The successful import is confirmed by the message the import was completed successfully.

  10. Click on the Activate button in the Change Center.

  11. Enter a text describing the changes into the Description field and click on the Submit button to activate the changes.

If we need to adapt some properties like endpoint URI to match the target environment, we can use a customization file and apply that when doing the deployment.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime