Вы находитесь на странице: 1из 47

SOA Suite 10g Developers Guide

SOA Suite 10g

Developers Guide

Table of Contents 1 2 3 Purpose ......................................................................................................... 1 SOA Environment .......................................................................................... 1 SOA Use Cases............................................................................................. 1 3.1 3.2 3.3 3.4 3.5 3.6 4 5 Invoke a Synchronous Service Use Case............................................... 1 Invoke an Asynchronous Service Use Case ........................................... 2 Audit BPEL instance execution Use Case .............................................. 2 Audit ESB instance execution Use Case ................................................ 2 Registry Server Lookup Use Case ......................................................... 2 WSDL Reference Use Case ................................................................... 3

CVSStructure ................................................................................................. 3 Multi-user development ................................................................................. 4 5.1 5.2 5.3 5.4 5.5 BPEL PM ................................................................................................ 5 ESB ........................................................................................................ 5 OWSM .................................................................................................... 5 Oracle Registry ....................................................................................... 5 Oracle Rules ........................................................................................... 5 BPEL PM ................................................................................................ 6 ESB ........................................................................................................ 7 OWSM .................................................................................................... 7 Oracle Service Registry .......................................................................... 7 Oracle Rules ........................................................................................... 7

Versioning SUPPORT for runtime components ............................................. 6 6.1 6.2 6.3 6.4 6.5

7 8 9

Version controlling of source code ................................................................. 7 Modify SOA system (Procedure / Guidelines).............................................. 7 Lifecycle (Dev to Test to Prod)....................................................................... 8 9.1 9.2 9.3 9.4 9.5 9.6 Dev environment .................................................................................... 8 DEV Log Files and Configuration files: ................................................. 10 Test environment .................................................................................. 11 TST Log Files and Configuration files: .................................................. 13 How to promote .................................................................................... 14 Utilities .................................................................................................. 15

SOA Suite 10g

Developers Guide

9.7 10 11 11.1 11.2 11.3 12 13

Utility Services ...................................................................................... 15 Monitoring ................................................................................................ 16 How to increase Logging level for BPEL/ESB/OWSM debugging purpose 16 BPEL Logging: ...................................................................................... 16 ESB logging: ......................................................................................... 16 OWSM Logging: ................................................................................... 17 OPMN(Oracle Process Notification and Management) ............................ 19 Applying Oracle Interim Patch .................................................................. 20

14 How to perform Snapshot of nightly/weekly when files on a server gets corrupted/removed. ............................................................................................. 21 15 15.1 15.2 15.3 Developer jdev setup ............................................................................... 21 Steps for Installing and Starting JDeveloper on Windows .................... 22 Starting JDeveloper on Windows .......................................................... 22 Below snapshot shows step by step explanation for jdeveloper usage.22 Create BPEL process .................................................................... 22 Deploy BPEL process.................................................................... 29 Test BPEL process ........................................................................ 37

15.3.1 15.3.2 15.3.3 16 17

Appendix A: Command cheat sheet ......................................................... 43 Appendix B: Resources ............................................................................ 44

SOA Suite 10g

Developers Guide

Purpose

The purpose of the document is help on boarding new developers in using new SOA setup. 2 SOA Environment

SOA Use Cases

The following SOA use cases represent the core functionality of the SOA environment. These use cases aim to highlight the order of operations and access paths during process execution and administration. 3.1 Invoke a Synchronous Service Use Case 1. Client makes HTTP request via load balancer. 2. Load balancer makes HTTP request to OHS on round-robin basis. 3. OHS makes AJP request to SOA Suite OC4J instance on round-robin basis. 4. OC4J instance makes JDBC calls to SOA database for dehydration and metadata.

-1-

SOA Suite 10g

Developers Guide

5. Response is returned from OC4J to OHS over AJP. 6. Response is returned to load balancer and client over HTTP. 3.2 Invoke an Asynchronous Service Use Case 1. Client makes HTTP request via load balancer. 2. Load balancer makes HTTP request to OHS on round-robin basis. 3. OHS makes AJP request to SOA Suite OC4J instance on round-robin basis. 4. SOA suite instance places request in request queue. 5. SOA suites instances alternate de-queueing of requests between SOA instances. 6. OC4J instance makes JDBC calls to SOA database for dehydration and metadata when the instance is serviced. 7. Response is returned from OC4J to OHS over AJP. 8. Response is returned to load balancer and client over HTTP. Audit BPEL instance execution Use Case 1. Client makes request to OHS from browser over HTTP. 2. OHS makes AJP request to SOA Suite OC4J instance on round-robin basis. 3. OC4J handles user login using JAZN-XML. 4. OC4J instance makes JDBC calls to SOA database for instance metadata information. 5. Response is returned from OC4J to OHS over AJP. 6. Response is returned to client over HTTP. Audit ESB instance execution Use Case 1. Client makes request to OHS from browser over HTTP. 2. OHS makes AJP request to SOA Suite OC4J instance on round-robin basis. 3. OC4J handles user login using JAZN-XML. 4. OC4J instance makes JDBC calls to SOA database for instance metadata information. 5. Response is returned from OC4J to OHS over AJP. 6. Response is returned to client over HTTP. Registry Server Lookup Use Case 1. Client makes request for service endpoint via load balancer. 2. Load balancer makes HTTP request to OHS on round-robin basis. 3. OHS makes AJP request to Oracle Registry Server (UDDI) instance on round-robin basis. 4. UDDI returns target service endpoint location for request.

3.3

3.4

3.5

-2-

SOA Suite 10g

Developers Guide

3.6

WSDL Reference Use Case 1. Client makes HTTP request via load balancer. 2. Load balancer makes HTTP request to OHS on round-robin basis.

CVSStructure

CVSStructure //depot/proj /soa/devel READM E.txt templat es/script s projects PeoplesoftPilot jdev .jws (Jdev workspace) BPELProcess1 .jpr (Jdev project) bpel build.xml build.properti es src Java Components BPELProcess2 ESBFlow1 arch ive

-3-

SOA Suite 10g

Developers Guide

build build.xml build.properties conf project.propertie s build.properties.devel build.properties.test db lib doc README.txt ReleseNote_XXX.txt Project XYZ UtilityServices schema s xslt

Multi-user development

This section specifies a set of guidelines to enable multi-user development in the SOA environment. The goal is to allow multiple users to design, develop, deploy and test in one environment at the same time without stepping on each other. Given the SOA suite comprises of a varied set of products, the guidelines and steps to enable multi-user development are different in each of them. These are spelt out in detail in the below sections.

-4-

SOA Suite 10g

Developers Guide

5.1

BPEL PM

Following are the steps to perform to provision a new user on the BPEL PM side: 1. Create user 2. Create domain 3. Create role to access the domain 4. Assign role from step #3 to user from step #1 5. Assign role from step #3 to BPMSystemAdmin At this point, the new user should be able to create a App Server and Integration Server connections from within JDeveloper and also be able to access the Oracle BPEL Control using his/her account. 5.2 ESB

There isnt any explicit support for multiple users provided out of the box. So, the proposed mechanism is to allow for multiple users to have a cooperative model where each user is cordoned off from others using the notion of ESB System. For a given user, there will be an ESB System that is created explicitly and all ESB flows that the user models should be deployed into his/her System. One can additionally create Service Groups if he/she wants to create a hierarchy of services within this System for further categorization or organization. 5.3 OWSM

A user account will be created at the App Server level with the necessary privileges to secure services using the gateway. This account will be used to perform all necessary OWSM related operations on the gateway by the corresponding user. 5.4 Oracle Registry

A user account will be created via the Oracle Service Registry Control with the necessary privileges to publish a service. Once a given service is in a stable state and ready to be consumed by others, the owner of service can publish it to the Service Registry in a well defined location. The registry will be set up such that a given user can access the registry in a READ ONLY mode while having WRITE privileges to the services he/she has published. 5.5 Oracle Rules Each user will have an app server account (will be the same one as created for BPEL PM in section 7.1.1) and a dictionary exclusively created for his/her consumption. A given user will have to create all rules in his/her dictionary and will not have access to others dictionaries.

-5-

SOA Suite 10g

Developers Guide

Versioning SUPPORT for runtime components

As true with any enterprise development environment, there is an inherent need to have versioning support. Most of the time, this is more of an implicit requirement as opposed to being an explicit one. One naturally expects to be able to roll out better and improved flavors of an existing system over a period of time with an ability to roll back to a previous flavor in case some of the existing functionality is broken. In the following sections we will go over this requirement in the context of the various SOA component stack: 6.1 BPEL PM

This SOA component has fairly rich versioning support out of the box. However, most of the versioning support is more of deployment/runtime kind; meaning, there is no explicit versioning support into the design time tooling itself. The development lifecycle comprises of creating a process, deploying a process, updating the process, deploying the process, updating the process, deploying the process and so on. As far as the process definition itself goes, there is no versioning being done and captured inside of the source code by the design time tooling. One gets to specify a new version number every time he/she deploys the business process; at this time, the onus is on the user to use a version control system to check-in the same process and keep track of the version numbers. One easy way would be to tag the version checked in with the version # that is being used at deployment time. That way, if you ever need to revert back to an earlier version, all one has to do is look for all files tagged with the previous version and redeploy the same. Note that this assumes support for tagging in the underlying version control system. For example, this is supported by Subversion will need to check if CVSsupports it as well. Deployment in the BPEL world comprises of various steps: pre-compile, compile, validate, deploy. At the end of the compile and validate steps, there is a suitcase (a jar file) comprising of all artifacts ready to be deployed. Deploy step consists of shipping the suitcase across to the server side. It is recommended to check-in this suitcase along with the version info into source code control just so we have the exact bits that were actually deployed (this is same as keeping track of the executable shipped as part of any product release in spite of having the corresponding versioned source code bits). The above can be accomplished by the same script that is responsible for command line deployment.

-6-

SOA Suite 10g

Developers Guide

6.2

ESB

There is no in-built versioning support available out of the box with the ESB component. So, this will have to be custom built as part of the SOA Foundation Layer. As per Oracle, most of the ESB flows are short lived at runtime as opposed to BPEL processes which could be long running and hence the need for versioning in BPEL and not as much in ESB. Regardless, as cited before, there is an implicit need for versioning to be able to rollback to an earlier set of bits if need be. And this can be achieved by version the design time artifacts essentially the JDeveloper project in conjunction with the zip file that is created at deployment time. 6.3 OWSM

Use Perforce to version control the OWSM metadata (policies, services) configured for a given gateway. 6.4 Oracle Service Registry

Use Perforce to version control the Oracle Service Registry metadata (take a database dump of the ORAUDDI schema). 6.5 Oracle Rules

Use Perforce to version the Oracle Rules dictionary (which is WEBDAV based repository). 7 Version controlling of source code

This section will have detailed guidelines for our internal version control system Perforce. This will be used to manage our code based on various pattern like a new project, fix, multiple fixes, release labeling, multiple projects etc. Our development IDE JDeveloper will be tested for a direct integration with CVSserver and would allow multiple developers to work on a centralized managed code global code repository. 8 Modify SOA system (Procedure / Guidelines)

When there is a need to modified any SOA system setup, the following steps need to be executed: Developer creates incident ticket in remedy with the detail

-7-

SOA Suite 10g

Developers Guide

Ops team creates QC accordingly and assign to the developer who create the incident ticket Send email to dl-eis and Anujit. If no concern voiced within 24 hours, consider approved. Changes can be proceeded. If changes is intended to be made in a text file, please add comment lines before and after the change spots like: <Begin Change: name of person, QC ticket number, date/time>lines that are changed.<End Change> CVSthe files that are changed so we have history. name of person, QC ticket number, date/time should be part of comment when checking in. 1. If changes need to be migrated to all environments, follow current release process

9 9.1

Lifecycle (Dev to Test to Prod) Dev environment

This environment will be used by all developers to develop business process / flows using BPEL PM or ESB, secure and publish once they are unit and sanity tested in their local sandbox environment. Subsequently, all the corresponding design time artifacts will be checked in to Perforce along with the relevant unit tests as well. There will be an automated continuous build set up in the Dev environment which will kick off nightly builds of all of the processes, deploy the same and run the complete sanity test suite. This sanity test suite will comprise of all of the unit tests checked in by the developers plus additional tests designated by the QA team. The idea is to ensure that all processes and flows checked in are up to par all the time and nothing gets broken; over time the sanity test suite will be enhanced to include more tests, thus improving the quality over time. Note that most of these processes and flows will depend on third party applications like PeopleSoft, Oracle ERP, Seibel CRM etc. which may or may not be always up and running. The test framework will be such that there will be provision to run a test in two flavors one with the connection to the real system and one with a stubbed out flavor which will simulate the third party connection but not necessarily exercise it. Even though the connection itself is stubbed out, all of the process is still exercised in completeness; so if there is a flaw in the business logic itself, it should still be caught by the test suite. Once the process/flow is developed, the developer will have the option of deploying either via JDeveloper or via command line using an ant based script. Although one has both these options, it is recommended that the command line

-8-

SOA Suite 10g

Developers Guide

option be exercised and tested before the code is checked into perforce. This will ensure that the route taken by the nightly build scripts is exercised as well. DEV1 Environment specific details: BPEL Console:http://sunsoapps1-dev:8888/BPELConsole/ ESB: http://sunsoapps1-dev: 8888/esb/ Enterprise Manager: http://sunsoapps1-dev: 8888/em Username/Pwd:oc4jadmin/youAreWelcome OWSM:http://sunsoapps1-dev:8888/ccore/ Username:admin/youAreWelcome

#ESB Paramters esbHostname="sunsoapps1-dev.corp.myOrg.com" esbHttpPort="8888" esbUsername="oc4jadmin" esbInstanceName="oc4j_soa" #BPEL Parameters bpelHostname="sunsoapps1-dev.corp.myOrg.com" bpelHttpPort="8888" bpelOpmnPort="6004" bpelUsername="oc4jadmin" bpelInstanceName="oc4j_soa" DEV2 Environment specific details: BPEL Console:http://sunsoapps2-dev:8888/BPELConsole/ ESB: http://sunsoapps2-dev: 8888/esb/ Enterprise Manager: http://sunsoapps2-dev: 8888/em Username/Pwd:oc4jadmin/youAreWelcome OWSM:http://sunsoapps2-dev:8888/ccore/ Username:admin/youAreWelcome #ESB Paramters esbHostname="sunsoapps2-dev.corp.myOrg.com" esbHttpPort="8888" esbUsername="oc4jadmin" esbInstanceName="oc4j_soa" -9-

SOA Suite 10g

Developers Guide

#BPEL Parameters bpelHostname="sunsoapps2-dev.corp.myOrg.com" bpelHttpPort="8888" bpelOpmnPort="6004" bpelUsername="oc4jadmin" bpelInstanceName="oc4j_soa" Below are the Database specific details for BPEL/ESB/OWSM: Host: svlsoadb1-tst.corp.myOrg.com DB Instance: dsoa.corp.myOrg.com Port: 2020

The above details are common across different schemas. Use below credentials to connect to ORABPEL/ORAESB/ORAWSM DB Schemas: UserName/Password:ORABPEL/soafndbpel1$ UserName/Password: ORAESB/soafndesb1$ UserName/Password: ORAWSM/soafndwsm1$ <<Imp table>> 9.2 DEV Log Files and Configuration files: Apache logs: Web Tier primarily comprises of the Apache HTTP Server. OHS is an Oracle wrapper around Apache to aid in monitoring, load balancing and directing requests only to nodes that are up and have a running application. Logs are present at below location. /oracle/product/102_dapp/102_app/Apache/Apache/logs/acess_log.xxxxx xxx /oracle/product/102_dapp/102_app/Apache/Apache/logs/error_log.xxxxxx xx data-sources.xml: /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/config/ oc4j-ra.xml: contains deployment configurations for deploying resource adapters to OC4J. It contains EIS connection information as specified in the deployment descriptor of the resource adapter (ra.xml), JNDI name to

- 10 -

SOA Suite 10g

Developers Guide

be used, connection pooling parameters, and resource principal mappings (security-config element) /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/applicationdeployments/default/DbAdapter /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/applicationdeployments/default/JmsAdapter

ns_emails.xml: Before using email activity, you must set up configuration details for email accounts in the ns_emails.xml.It is present at below location /oracle/product/102_dapp/102_app1/bpel/system/services/config /oracle/product/102_dapp/102_app1/bpel/domains/<<domainname>>/l ogs domain.log: BPEL domain logs

log.xml:(ESB RT Logs) ESB runtime, responsible for executing all of the ESB flows deployed into the ESB cluster.Logs are present at below location. /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/log/oc4j_soa_defau lt_group_1/oc4j

log.xml:(ESB DT Logs)ESB design time responsible for all of the communication of the ESB flows via the repository. /oracle/product/102_dapp/102_app1/j2ee/oc4j_esbdt/log/oc4j_esbdt_d efault_group_1/oc4j /oracle/product/102_dapp/102_app1/opmn/logs /oracle/product/102_dapp/102_app1/j2ee/oc4j_wsm/log

opmn.log: gateway.log: OWSM gateway logs

9.3

Test environment

The test environment is similar to the Development environment, except that this will be cluster enabled as well. The primary difference is how processes or flows are deployed into this environment when compared to Dev. Unlike Dev, where processes/flows are deployed by the developers while they are being designed and developed, only checked-in code (processes/flows existing in Perforce) will be deployed into Test environment. It is mostly QA team, which will work and develop tests in this environment. Any tests, which are deemed - 11 -

SOA Suite 10g

Developers Guide

basic, will be migrated over to the dev environment and made part of the dev sanity test suite. Similar to the dev environment, the test environment will have a night build as well which will comprise of a much larger test suite (dev sanity test suite + all of the tests developed by the QA team, most of which will span multiple processes/flows). Unlike dev, most of the tests here will run by exercising all of the third party connections as well (as this is the final stop on way before processes/flows are promoted to prod). The same ant based command line scripts used in dev environment will suffice for test environment as well. TEST Environment specific details: BPEL Console: http://soa-test.corp.myOrg.com/BPELConsole/ ESB: http://soa-test.corp.myOrg.com/esb Enterprise Manager: http://soa-test.corp.myOrg.com/em Username/Pwd:oc4jadmin/youAreWelcome OWSM:http://soa-test.corp.myOrg.com/ccore/ Username: admin/oracle

#ESB Paramters export set esbHostname="soa-test.corp.myOrg.com" export set esbHttpPort="80" export set esbUsername="oc4jadmin" #BPEL Parameters export set bpelHostname="sunsoapps1-tst" export set bpelJ2EEHostname="sunsoapps1-tst" export set bpelHttpPort="8888" export set bpelOpmnPort="6003" export set bpelUsername="oc4jadmin" export set bpelInstanceName="oc4j_soa" export set clusterBpel="true" export set SCHEMAS_BASE=/u/soatst/integration/schemas export set MAPS_BASE=/u/soatst/integration/maps/ Note:Schemas/Maps which are related to projects are being placed under user soatst (soatst/ T5y6u7i*)and the soft links/symbolic links are crated under OHS,location >>cd /oracle/product/102_app/Apache/Apache/htdocs/maps/PSFT_SOA - 12 -

SOA Suite 10g

Developers Guide

maps -> /u/soatst/integration/maps >>/oracle/product/102_app/Apache/Apache/htdocs/schemas/PSFT_SOA schemas -> /u/soatst/integration/schemas Siimilarly we need to place the javakeystore files under /u/soatst/integration/jks and can be used for encryption/decryption step in owsm Below are the Database specific details for BPEL/ESB/OWSM: Host: svlsoadb1-tst.corp.myOrg.com DB Instance: tsoa.corp.myOrg.com Port: 2040

The above details are common across different schemas. Use below credentials to connect to ORABPEL/ORAESB/ORAWSM DB Schemas: UserName/Password:ORABPEL/soafndbpel1$ UserName/Password: ORAESB/soafndesb1$ UserName/Password: ORAWSM/soafndwsm1$ 9.4 TST Log Files and Configuration files: Apache logs: /oracle/product/102_app/Apache/Apache/logs/acess_log.xxxxxxxx /oracle/product/102_app/Apache/Apache/logs/error_log.xxxxxxxx data-sources.xml: /oracle/product/102_app1/j2ee/oc4j_soa/config/ oc4j-ra.xml /oracle/product/102_app1/j2ee/soa/applicationdeployments/default/DbAdapter /oracle/product/102_app1/j2ee/soa/applicationdeployments/default/JmsAdapter /oracle/product/102_app1/bpel/system/services/config

ns_emails.xml: domain.log:

- 13 -

SOA Suite 10g

Developers Guide

/oracle/product/102_app1/bpel/domains/<<domain_name>>/logs /oracle/product/102_app1/j2ee/oc4j_soa/log/oc4j_soa_soa_group_1/oc 4j /oracle/product/102_app1/j2ee/oc4j_esbdt/log/oc4j_esbdt_esbdt_group _1/oc4j /oracle/product/102_app1/opmn/logs /oracle/product/102_app2/j2ee/oc4j_gtwy/log

log.xml:(ESB RT Logs)

log.xml:(ESB DT Logs)

opmn.log: gateway.log: 9.5

How to promote

Promotion to test will involve the following steps: 1. Design/develop the process or flow in dev environment. 2. Unit test the same. 3. Check in process/flow into perforce. 4. Process/flow tested as part of the dev nightly build. 5. Deploy the same to test environment using the ant based command line scripts. Promotion to prod will involve the following steps: 1. More thorough testing of the process/flow via more unit tests, tests spanning multiple processes/flows, end to end tests. 2. Checking in all of the above tests into perforce. 3. Process/flow tested as part of the test nightly build. 4. Deploy the same to prod environment using the ant based command line scripts. 5. Check in of all the binaries (from step #4) into perforce for tracking and release management purposes. Promotion of environment specific global variables 1. Domain MAP will have the environment specific global variables and properties. 2. Domain map is multi-dimention spreadsheet like sheet in ESB 3. Domain MAPs can be somple exported and imported into ESB container

- 14 -

SOA Suite 10g

Developers Guide

9.6 Utilities Following are the utilities that will be checked in to perforce for all developers to use in dev, test, and prod environments. All of these will be ant based scripts to make them platform independent. 1. Check in script for a specified directory it will check in all of the necessary artifacts (excluding any temporary files etc.). The idea is to hide the detail and not bother users/developers about what needs to be checked in Vs what not. There will be one for BPEL processes and one for ESB flows. 2. Deployment script for a specified directory/project and environment, this script will deploy process/flow to the respective environment. Additionally, this script will have an option to enable tracking of the binaries/bits being deployed to the respective environment (this is primarily for tracking of releases/versions of code that is rolled out into production). 3. Release/patch generation script script to generate a release or a patch which can then be used to do promotion to either test or prod. This script will do the necessary tagging or labeling in perforce to keep track of release/version info. 4. Template scripts script to create/check in a template for either a process or flow; script to check out and create a project based on a template. 9.7 Utility Services

This section contains all Utility services which are of horizontal nature meaning they will be re-used across by all services not just by one specific service or application. We do not mean to mention the utility services available out of the box like say Notification service. 1. Transformation service this service will be responsible for taking in an input document and an XSLT map and returning the transformed document. 2. Notification service this service will be sending the email / pager notification in case of a business or technical error. Following patterns will be considered for designing this service i) Maximum no. of notification for a predefined time interval ii) Escalation of business critical failures iii) XSLT based E-Mail body iv) E-mail recipients management v) Connectivity with Oracle BAM if needed vi) Action and steps to restore the process

- 15 -

SOA Suite 10g

Developers Guide

10 Monitoring A complete monitoring system will be designed for Monitor the SOA infrastructure. This section will have a detailed analysis of following endpoints

1. Machine level monitoring We would consider existing tools like Tivoli, hawk etc. 2. Monitor Error JMS topics 3. JMX monitoring - Each container will be running one or more JVM. Need to analyse a JMX based monitoring and management system for our distributed apps. 11 How to increase Logging level for BPEL/ESB/OWSM debugging purpose 11.1 BPEL Logging: Login to BPELConsole http://sunsoapps1-dev:8888/BPELAdmin using oc4jadmin/youAreWelcome Select logging tab->change the levels and select apply. Log4j by default can log messages with five priority levels

debug - debugging messages which should not be printed when the application is in production. info - for messages similar to the "verbose" mode of many applications. warn - for warning messages which are logged to some log but the application is able to carry on without a problem. error - for application error messages which are also logged to some log but, still, the application can hobble along. Such as when some administrator-supplied configuration parameter is incorrect and you fall back to using some hard-coded default value. fatal - for critical messages, after logging of which the application quits abnormally.

11.2 ESB logging: Logger levels are modified by navigating through the Application Server Control, or directly via; http://sunsoapps1-dev: 8888/em/

- 16 -

SOA Suite 10g

Developers Guide

NOTE: you may need to select the oc4j_soa j2ee container; otherwise by default this url may point to the 'home' container. You can navigate to the logger section via the following steps from within ; http://sunsoapps1-dev:8888/em/ Cluster Topology > Application Server: soadev.sunsoapps1-dev > OC4J: oc4j_esbdt > click on administration > under Administration Tasks / Properties - click on logger configuration. The following information now applies; Any log level set to NULL will inherit the parent log level for that logger. The log levels are NULL (default), SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST. You can enter 'esb' into the 'Search by Logger Name' to show all ESB loggers. For debugging problems, the 'FINEST' setting is recommended. Remember to stop and start the oc4j container for this modification to take effect. And also to reset the logger back to the prior value once you have completed your debugging 11.3 OWSM Logging: The out-of-box log level is INFO for all OWSM applications. For debugging purposes, you may want to bump this log level to get further details on the problem. Following instructions will allow you to achieve this. OWSM Gateway Make sure that OC4J application server is running. Open /oracle/product/102_app2/owsm/config/gateway/logging.xml and replace all INFO with ALL. Go to /oracle/product/102_app2/owsm/bin directory, and run the following command wsmadmin deploy OC4J_ADMIN_PASSWORD gateway The changed log level for the gateway application is in effect now. Look for the detailed logs in /oracle/product/102_dapp/102_app1/j2ee/oc4j_wsm/log OWSM Control Make sure that OC4J application server is running. Open /oracle/product/102_app2/owsm/config/ccore/logging.xml and replace all INFO with ALL.

- 17 -

SOA Suite 10g

Developers Guide

Go to /oracle/product/102_app2/owsm/bin directory, and run the following command wsmadmin deploy OC4J_ADMIN_PASSWORD control The changed log level for the gateway application is in effect now. Look for the detailed logs in /oracle/product/102_app2/j2ee/OC4J_Instance/log/ccore.log OWSM Policy Manager Make sure that OC4J application server is running. Open /oracle/product/102_app2/owsm/config/policymanager/logging.xml and replace all INFO with ALL. Go to /oracle/product/102_app2/owsm/bin directory, and run the following command wsmadmin deploy OC4J_ADMIN_PASSWORD policymanager The changed log level for the gateway application is in effect now. Look for the detailed logs in /oracle/product/102_app2/j2ee/OC4J_Instance/log/policymanager.log OWSM Monitor Make sure that OC4J application server is running. Open /oracle/product/102_app2/owsm/config/coreman/logging.xml and replace all INFO with ALL. Go to /oracle/product/102_app2/owsm/bin directory, and run the following command wsmadmin deploy OC4J_ADMIN_PASSWORD monitor The changed log level for the gateway application is in effect now. Look for the detailed logs in /oracle/product/102_app2/j2ee/OC4J_Instance/log/coreman.log OWSM Agents on OC4J Server Agent or J2EE Client Agent Make sure that OC4J application server is running. Open /oracle/product/102_app2/owsm/config/interceptors/componentId/config/clientage nt or serveragent/logging.xml and replace all INFO with ALL. Restart the application. The changed log level for the serveragent application is in effect now. Look for the detailed logs in /oracle/product/102_app2/j2ee/OC4J_Instance/log/serveragent.log for serveragent (and clientagent.log for client agents).

- 18 -

SOA Suite 10g

Developers Guide

12 OPMN(Oracle Process Notification and Management) Use the Oracle Process Notification and Management daemon (opmnctl) to start, stop and poll the SOA OC4J instances and Oracle HTTP Server To check the status of all OPMN processes in the cluster, execute the following command: opmnctl status @cluster >>Start To start all OC4J instances, execute the following command on each cluster instance: >> opmnctl startall To start an OC4J instance, execute the following command on a specific node: >> opmnctl startproc process-type=<process name> The following are valid process names: >>soa >>esbdt >>esbrt >>ohs >>Stop To stop all OC4J instances and shutdown the OPMN daemon, execute the following command on each cluster instance: >>[ soauser@sunsoapps1-tst config]$ opmnctl shutdown or >>[ soauser@sunsoapps1-tst config]$ opmnctl stopall To stop an OC4J instance, execute the following command on a specific node: >> opmnctl stopproc process-type=<process name> The following are valid process names: >>soa >>esbdt >>esbrt >>ohs

- 19 -

SOA Suite 10g

Developers Guide

eg:[ soauser@sunsoapps1-tst config]$ opmnctl stopproc process-type=soa >>Restart To Restart an OC4J instance, execute the following command on a specific node: [soauser@sunsoapps1-tst config]$ opmnctl restartproc process-type=soa >>shutdown - Shutdown opmn & all managed processes soauser@sunsoapps1-tst config]$opmnctl shutdown 13 Applying Oracle Interim Patch At times we may need to apply Oracle Interim Patch for Base Bug eg: 7576325 .We need to get the approval from the SOA Manager (Kailash Randad) before applying any patch. Please follow below steps to apply the patch on all the machines from DEV/TST Login to sunsoapps1-dev using your login and take sudo rigths >>su soauser and provide password >>Once you login you are logged as soa i.e Logging on to 'SOA Dev (SOA)' environment >>Make sure all instances running under the ORACLE_HOME being patched are cleanly shutdown before installing this patch. Also ensure that the tool used to terminate the instance(s) has exited cleanly. >>opmnctl stopall Make sure all the instances are down and check status using >>opmnctl status Before applying the patch it has to be saved from metalink .oracle.com to a shared directory eg: /u/soauser/soa_downloads/soa_patches/7576325/ >>cd /u/soauser/soa_downloads/soa_patches/7576325/ Now you are in /u/soauser/soa_downloads/soa_patches/7576325/ directory Please check using pwd command as we need to make sure before we apply patch Then run the opatch from the patch directory after setting the PATH correctly as follows: >>setenv PATH ${PATH}:${ORACLE_HOME}/OPatch >>opatch lsinventory >>opatch apply >>Now start the instances using >>opmnctl startall >>opmnctl status(check if it is Alive or not)

- 20 -

SOA Suite 10g

Developers Guide

>>Repeat the steps on sunsoapps2-dev and perform the same as to apply the patch Once you are done applying patch and tested successfully. We may need to apply the same on sunsoapps1-tst and sunsoapps2-tst 14 How to perform Snapshot of nightly/weekly when files on a server gets corrupted/removed. At times (very rare) because of environment issues we may face the files getting corrupted/deleted from the server and we may need to have the snapshots of the hourly/Weekly .In such scenarios before performing snapshot we need to raise a ticket to Unix ops for which it caused the files getting removed from the server. Next we need to get the approval from the SOA Manager (Kailash Randad). Please follow below steps to get the snapshot of the hourly/Weekly >> Login to the particular server eg: sunsoapps1-dev for which we have the issue and we need to take the snapshot. >> All the hourly/Weekly snapshots are stored under .snapshot folder and its is present under /oracle/product/.snapshot/ >>Under /oracle/product/.snapshot/nightly.1 you may find the snapshot folder of 102_app1 where you need to replace with the corrupted ones. >>Before performing the snapshots make sure all the services are bought down using opmnct stopall and check the status using opmnctl status >>Next move the corrupted folder using move command cd /oracle/product mv 102_app1 102_app1.23JUL.ISSUE >>Now copy the nightly 102_app1 to /oracle/product using below command cp Rf /oracle/product/.snapshot/nightly.1/102_app1 /oracle/product/ Once you are done with the copy bring up the services using opmnctl startall and check the status using opmnctl status. 15 Developer jdev setup Oracle JDeveloper 10g is a complete and integrated development environment for standards-based SOA applications. The Oracle JDeveloper 10g Release 3 (10.1.3) version adds many new features including a new look and feel, a greatly improved coding environment with extensive refactoring options, support for the latest Java standards (J2SE 5.0, J2EE 1.4, EJB 3.0), and visual JSF development. A visual and declarative approach and the improved Oracle Application Development Framework (Oracle ADF) work together to simplify application development and reduce mundane coding tasks, offering developers

- 21 -

SOA Suite 10g

Developers Guide

unparalleled productivity regardless of their choice of technology stacks and deployment platforms. Note:Currently we are using 10.1.3.3 for order management and Peoplesoft projects 15.1 Steps for Installing and Starting JDeveloper on Windows The complete installation (jdevstudio10133.zip) includes the Windows version of JDK 5.0 Update 6 and the JDeveloper documentation. To install JDeveloper from jdevstudio10133.zip, unzip jdevstudio10133.zip in the directory you want to install JDeveloper. Ensure that this directory does not contain spaces. For example, do not use C:\Program Files as the installation directory. Note: <jdev_home> to represent the directory location in which JDeveloper was installed. For example, if JDeveloper was unzipped in c:\jdeveloper, the <jdev_home> directory would be c:\jdeveloper. 15.2 Starting JDeveloper on Windows To start JDeveloper on Windows, run any of the following files:

<jdev_home>\jdev\bin\jdevw.exe <jdev_home>\jdev\bin\jdev.exe (to display a console window for internal diagnostic information) <jdev_home>\jdeveloper.exe

Refer Jdeveloper documentation from below URL http://www.oracle.com/technology/documentation/jdev.html 15.3 Below snapshot shows step by step explanation for jdeveloper usage. 15.3.1 Create BPEL process a. Launch Jdev C:\ jdevstudio10133\jdeveloper.exe b. Create a Jdev application Use menu option: File -> New Specify application name: HelloWorld On the last screen of the wizard Create Project hit Cancel - 22 -

SOA Suite 10g

Developers Guide

- 23 -

SOA Suite 10g

Developers Guide

c. Create a BPEL project inside the above application Use menu option: File -> New, see screenshot to pick BPEL Process Project Specify process name as: HelloWorldSync Specify process type as: Synchronous BPEL Process Last screen of the wizard Input/Output Elements go with Defaults, click Next.

- 24 -

SOA Suite 10g

Developers Guide

- 25 -

SOA Suite 10g

Developers Guide

d. Update the BPEL process that is generated out of the box Insert an assign activity to copy the string from input variable to output variable This process returns the same string that is specified to initiate itself in other words, it is more of an echo process Screenshots below tell you how to create this assign activity

- 26 -

SOA Suite 10g

Developers Guide

- 27 -

SOA Suite 10g

Developers Guide

- 28 -

SOA Suite 10g

Developers Guide

15.3.2 Deploy BPEL process e. Create App server connection (Dev) Step 1:Specify name: Dev_AppServer, type: Oracle Application Server 10g 10.1.3 Step 2: Specify password: welcome1 Step 3: Specify hostname: sunsoapps1-dev, port: 6004, instance name: oc4j_soa Step 4: Click on Test Connection to validate this connection - 29 -

SOA Suite 10g

Developers Guide

f. Create App server connection (Test) Step 1:Specify name: Test_AppServer, type: Oracle Application Server 10g 10.1.3 Step 2: Specify password: welcome1 Step 3: Specify hostname: sunsoapps1-tst, port: 6003, instance name: oc4j_soa Step 4: Click on Test Connection to validate this connection

- 30 -

SOA Suite 10g

Developers Guide

- 31 -

SOA Suite 10g

Developers Guide

g. Create Integration server connection (Dev)

- 32 -

SOA Suite 10g

Developers Guide

See screenshot below to see how to launch this wizard Step 1: Specify connection name as: Dev_BPEL Step 2: verify that Dev_AppServer is picked for app server connection, hostname: sunsoapps1-dev, port: 8888, also check the proxy exception checkbox Step 3: Test this integration server connection h. Create Integration server connection (Test) See screenshot below to see how to launch this wizard Step 1: Specify connection name as: Test_BPEL Step 2: verify that Test_AppServer is picked for app server connection, hostname: sunsoapps1-tst, port: 8888, also check the proxy exception checkbox Step 3: Test this integration server connection

- 33 -

SOA Suite 10g

Developers Guide

- 34 -

SOA Suite 10g

Developers Guide

i.

Deploy BPEL process using the integration server connection Use the screenshot below to refresh the BPEL connection to show the domains Then deploy to the default domain under Dev_BPEL (for dev environment), Test_BPEL (for test environment) Go with the default version 1.0 for the process Confirm per the last screenshot in this section to make sure that the deployment is successful

- 35 -

SOA Suite 10g

Developers Guide

- 36 -

SOA Suite 10g

Developers Guide

15.3.3 Test BPEL process j. Launch the BPEL console Go to the BPEL console URL: http://sunsoapps1dev:8888/BPELConsole Login using oc4jadmin/youAreWelcome

- 37 -

SOA Suite 10g

Developers Guide

- 38 -

SOA Suite 10g

Developers Guide

k. Initiate an instance of the above deployed process By clicking on the process HelloWorldSync in the above screenshot Specify any string for input in the Initiate Instance page Click on Post XML Message to initiate an instance of this BPEL process

l.

Verify that the process is working You should see the same string that you specified as input as the output of this process See screenshot below - 39 -

SOA Suite 10g

Developers Guide

This folder contains instructions to patch the client Jdeveloper install to enable bpel process deployment from command line. This piece of functionality does not work out of the box. It needs to be patched using the below instructions. Below are the changes that need to be made to the following files residing in $JDEV_HOME/integration/bpel/utilities directory. Once the below changes are made to JDev installation, one should be able to run the following command from the jdev project directory to deploy the bpel process.

- 40 -

SOA Suite 10g

Developers Guide

$ ant [-Doracle.home=<Root JDev directory>] [-Dhostname=sunsoapps1-dev] [Dhttp.port=8888] 1. "oracle.home" corresponds to the root directory for Jdev installation; for example: C:/Jdev. This parameter does not need to be specified if ORACLE_HOME environment variable is set to the same directory or if you have followed Tip #1 below. 2. "hostname" and "http.port" are optional properties which are picked up from ${oracle.home}. Below are the changes that you need to make in detail. One easy way to patch these files is by overwriting the following three files from this directory into $JDEV_HOME/integration/bpel/utilities directory. 1. ant-orabpel.properties 2. ant-orabpel.xml 3. bpel_build_template.xml ant-orabpel.properties ====================== 15c15 < hostname --> hostname 17c17 < http.port --> http.port = 8888 = 9700 = sunsoapps1-dev.corp.myOrg.com = localhost

ant-orabpel.xml =============== 7,10c7,10 < <pathelement location="${bpel.home}/lib/orabpel-ant.jar"/> - 41 -

SOA Suite 10g

Developers Guide

< < < --> > > > < < < --> > > < -->

<pathelement location="${bpel.home}/lib/orabpel.jar"/> <pathelement location="${bpel.home}/lib/orabpel-thirdparty.jar"/> <pathelement location="${bpel.home}/lib/orabpel-common.jar"/> <pathelement location="${bpel.home}/../lib/orabpel-ant.jar"/> <pathelement location="${bpel.home}/../lib/orabpel.jar"/> <pathelement location="${bpel.home}/../lib/orabpel-thirdparty.jar"/> <pathelement location="${bpel.home}/../lib/orabpel-common.jar"/> <pathelement location="${bpel.home}/lib/xmlparserv2.jar"/> <pathelement location="${bpel.home}/lib/orawsdl.jar"/> <pathelement location="${bpel.home}/lib/connector15.jar"/> <pathelement location="${bpel.home}/../../lib/xmlparserv2.jar"/> <pathelement location="${bpel.home}/../../webservices/lib/orawsdl.jar"/> <pathelement location="${bpel.home}/../lib/connector15.jar"/> <pathelement location="${bpel.home}/lib/oracle_http_client.jar"/> <pathelement location="${bpel.home}/../lib/oracle_http_client.jar"/>

12,14c12,14

17c17

20c20 < <pathelement location="${bpel.home}/system/appserver/oc4j/j2ee/home/lib/oc4j-internal.jar"/> --> <pathelement location="${bpel.home}/../../j2ee/home/lib/oc4j-internal.jar"/>

bpel_build_template.xml ======================= 20a21 > < <property name="oracle.home" value="${env.ORACLE_HOME}"/> rev="${rev}" home="${bpel.home}"/> 62c63

- 42 -

SOA Suite 10g

Developers Guide

--> rev="${rev}" classpath="${orabpel.tasks.class.path}" home="${bpel.home}"/> Tip #1: In the above change "20a21" to bpel_build_template.xml, the assumption is that ORACLE_HOME environment variable will be set to the root Jdev directory in the shell that will be used for performing ant based deployment. You could instead specify the jdev root directory as the value of "oracle.home" attribute, given you are not going to move around your Jdev installation. 16 Appendix A: Command cheat sheet Following are some of the commonly used commands on the Oracle App Server mid-tier: 1) Start all components a) opmnctl startall 2) Stop all components a) opmnctl stopall 3) Show status a) opmnctl status (basic containers) b) opmnctl status l (detailed containers) c) opmnctl status app (basic applications) d) opmnctl status app l (detailed applications) 4) Deploy BPEL process (specified version) to specific host/port a) ant -Doracle.home=C:/Programs/JDev Drev=2.0 -Dhostname=webdevel3.corp.myOrg.com -Dhttp.port=8888 5) Deploy ESB project to dev: ant -Dparam.target.env=dev DeployESBProject a) Replace dev with test or prod appropriately 6) Create a new container called dummy a) createinstance -instanceName dummy -protocol ajp 7) Restart a specific container say esbdev a) opmnctl restartproc process-type=esbdev 8) Redeploy a specific application a) $ORACLE_HOME/jdk/bin/java -jar admin_client.jar deployer:oc4j:opmn://localhost:6005/esbdev oc4jadmin welcome1 -deploy -file ../../integration/esb/lib/oraesb-rt.ear -deploymentName esb-rt

- 43 -

SOA Suite 10g

Developers Guide

17 Appendix B: Resources Below is a list of useful resources for Oracle SOA stack based development: 1. BPEL Forum a. http://forums.oracle.com/forums/forum.jspa?forumID=212 2. SOA Forum a. http://forums.oracle.com/forums/forum.jspa?forumID=320 3. Oracle SOA Suite Documentation (Manuals) a. http://downloadeast.oracle.com/docs/cd/B31017_01/nav/docindex.htm 4. Oracle AS Adapters (Tutorials) a. http://www.oracle.com/technology/products/integration/adapters/de v_support.html 5. http://www.sslshopper.com/article-most-common-java-keytool-keystorecommands.html

- 44 -

Вам также может понравиться