September 29, 2009

Deploy using the deploy tool utility in AIA

One of the good utilities that can be used to deploy the BPEL/ESB is AIA deploy tool. In the BPEL and ESB projects that we create, we use the partner link locations, WSDLs and XSDs for a particular server. If we need to deploy these projects to a different server, then we need to change the locations of the WSDLs and XSDs everytime.

Instead of doing it manually, we can use AIA Deploy tool. This utility has a tokenizer which will tokenize and change the URLs accordingly in the entire project and generates the build.xml (incase of BPEL) and deploymentplan.xml (incase of ESB). We can then run the 'ant' tool to deploy our processes to the server.

The DeployTool is located in $AIA_HOME/util. Here are the steps to use it.

1. There is a file called Tokenizer.properties which we need to populate the process directory (directory of the BPEL/ESB project). Ensure the process directory has the read/write permissions. Update the Tokenizer.properties with the following properties:

a) home.dir1 -> enter the directory of the process to be deployed.
eg: home.dir1=/product/example/JMSAdapterServices/MySample

b) ESB_COPY_FOLDER =/product/AIA_HOME/util/DeployTool/EsbCopy

c) BPEL_COPY_PATH=product/AIA_HOME/util/DeployTool/BpelCopy

2. Run the command to deploy:
$ ant runesb -DTokenizerPropsFilePath=/product/AIA_HOME/util/DeployTool/Tokenizer.properties

$ ant runbpel -DTokenizerPropsFilePath=/product/AIA_HOME/util/DeployTool/Tokenizer.properties

Note: Deploy tool will only create the deployment plan for ESB. It does NOT deploy the process. Once the deployment plan is generated, goto the ESB directory and run the ant tool to deploy the process.

4. Goto $AIA_HOME/bin and source the AIA environment file - aiaenv.sh. This will source all the environment variables. Then run "ant" to deploy the process.

Move AIA Home from one location to another

More often, w face this issue when preparing the DEV/TEST instances. What if we install AIA in one of the directories and what we our mount point is out of space and we want to move this directory to another location?

1. The solution is very simple. The configuration for AIA home is referred only in one location i.e., opmn.xml file. This file is located in $ORACLE_HOME/opmn/conf directory, where ORACLE_HOME is the directory location where the SOA Suite is installed.

For the oc4j_soa container, the AIA home is mentioned in the module-data element as follows:

-Daia.home=/slot/ems1054/oracle/product/AIAHOME

So, if the AIA Home needs to be moved to a different location, this is one of the config files to be changed.

2. Then, in the $AIA_HOME/bin, change the locations of the directories in aiaenv.sh (aiaenv.cmd for Windows).

3. For some of the PIPs like Revenue Accounting, the AIA location is specified in the $AIA_HOME/config/AIAConfigurationProperties.xml file. So, change the locations in this file as well.

Thats it !!! Restart the SOA and everything is fine to go with new AIA Home.

September 17, 2009

Benefits of upgrading to Weblogic Server

There has been a mail thread on this topic in the FMW Forum and I liked the White paper on this. Couple of points from the people who replied to this:

In addition to being the strategic runtime for Oracle Fusion Middleware, the new product lines acquired from BEA, the Oracle Applications portfolio and the forthcoming Fusion Applications, Oracle WebLogic Server offers significant additional capabilities to the Oracle Application Server customer base beyond that which was available within Oracle Application Server including:

1. Runtime: Within the area of the core container, beyond the fully certified Java EE 5.0 compatibility, WebLogic Server extends the runtime in numerous areas including the Java Message Service (message ordering with unit of order, unit of work, scale out with distributed destinations and store and forward infrastructure, C and .NET JMS clients), Web services (conversational Web services, buffered Web services, asynchronous Web services, SOAP over JMS), built-in Tuxedo integration and runtime tuning (self tuning work managers) amongst others.

2. Development: Within the area of development capabilities above that in basic servers, WebLogic includes Java class FastSwap capabilities for fast test/debug cycles without server restarts, split development for tightly integrated IDE development, HTTP Publish/Subscribe Server for AJAX applications, filtering class loader to handle multiple versions of class libraries, Ant tasks for development, deployment and configuration automation and deep Eclipse and JDeveloper integration amongst others.

3. Operations and Administration: Within the area of operations and administration, WebLogic Server extends basic server capabilities in numerous areas including transactional and batch configuration, zero-downtime re-deployment, domain template builder and configuration wizard for simplified cloning, consistent scripting and command line tooling for all server configuration with WebLogic Scripting Tool, sophisticated lifecycle control over applications and the container, built in diagnostics framework amongst others.

4. High Availability: Within the area of high availability WebLogic Server extends basic core availability capabilities in a number of areas including clustered JNDI, whole server migration, service migration, high availability for singleton services

The white paper can be downloaded here.

September 7, 2009

Increasing the logging to Weblogic Message Bridge

Steps to increase the logging on Weblogic 10.3.1 Message Bridge.

It would be great if Weblogic too has a logging feature enablement for all the individual components in a single page as in OC4J. There is one Logging tab for the Domain but it doesnt help any. I have an issue in JMS Message Bridge but couldnt find any tab/page where I could increase/enable the logging for the Bridge.

After digging few Weblogic document, I found that this has to be done via the flags while WL is being started.

The easiest place is in the startWeblogic.cmd (startWeblogic.sh for Linux flavours). Search for the comment "START WEBLOGIC" and then include the debug flags in the Weblogic startup line as follows:

Original line:
echo JAVA_HOME\bin\java JAVA_VM MEM_ARGS -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy JAVA_OPTIONS PROXY_SETTINGS SERVER_CLASS
JAVA_HOME\bin\java JAVA_VM MEM_ARGS -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy JAVA_OPTIONS PROXY_SETTINGS SERVER_CLASS
)

Included line:
echo JAVA_HOME\bin\java JAVA_VM MEM_ARGS -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy JAVA_OPTIONS PROXY_SETTINGS SERVER_CLASS
JAVA_HOME\bin\java JAVA_VM MEM_ARGS -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy -Dweblogic.Debug.DebugMessagingBridgeStartup=true -Dweblogic.Debug.DebugMessagingBridgeRuntime=true JAVA_OPTIONS PROXY_SETTINGS SERVER_CLASS
)

There is an IF statement in starting Weblogic script that checks for redirection of the log file. Its in the same location as above statement. So, include the flags in the both the places.

Restart Weblogic and check the AdminServer.log for more information on Bridging.

December 15, 2008

AQ - Weblogic JMS Connectivity using Weblogic JMS Bridge

This white paper (still in draft) will help configure a JMS Bridge between AQ queues and Weblogic JMS queues. Thanks to Robert Patrick who helped me in this. It was a great learning. The configuration is pretty simple once the things are known.

Download the PDF - here. Please note that the images are not clear in this one as I have created a PDF for web. Mail me incase you need the file with clear images. Obviously, the file size in big in size.

October 22, 2008

JDeveloper 11g Production Released

I am so excited to see new JDeveloper 11g production release to the public. It has got tons of new features to play with. One interesting thing is that JDeveloper 11g now has a Installer :) which came as a surprise to me. Until now, we just unzip the package, but now, we have a cool installer, ofcourse as every oracle application install, this one too is a easy ride.

One major change that we have in this version is that the OC4J container is removed and BEA Weblogic container is used in place of OC4J. I was hurt by this because I like OC4J more than BEA. BEA app container is also a cool product and has a stronger foundation than OC4J. Still need to explore more on this area.

These are the quick installer steps for installing newwwwww JDeveloper 11g Production release:

2.png

3.png

We can see that this installation is similar to BEA Weblogic installation. Oracle has just managed to combine both the installers (Weblogic and JDeveloper).

4.png

5.png

6.png

7.png

8.png

9.png

10.png

11.png

12.png

13.png

14.png

15.png

16.png

17.png

18.png

And NOW for the JDeveloper 11g Interface

1.png

There are tons of new features in this release and can they can be checked here.

The quick tutorials can be found here.

One sad thing I felt is SOA part is removed from this release. From FAQs, I found that it will be released when SOA Suite 11g is released.

Sooo, until then enjoy the new JDeveloper 11g for developing ADF, Fusion and J2EE apps :)

October 7, 2008

Steps to connect to Weblogic 9.2 using JMS Adapter in Oracle BPEL / ESB

Oracle JMS Adapter is a very special JMS client that can connect to any JMS server whether it is OC4J (In-memory or DB) or a 3rd-party JMS servers like Weblogic, Websphere, Tibco, MQseries or OpenJMS or any other. Once the configuration is correct, it is as simple as connecting to a local queue and producing and consuming the messages.

The following are steps (these are not my steps :) .. I have taken these steps from SOA Best practises document) to connect to Weblogic 9.2 using JMS Adapter in Oracle BPEL / ESB:

Weblogic.jar is a file, which contains almost most of the logic to connect to the Weblogic and tune the configuration of the weblogic server. The best part of Weblogic is that this file alone is enough to connect to the Weblogic and manage it.

1. So, first step to connect to Weblogic is to copy weblogic.jar (from $WL_HOME/weblogic92/server/lib, where WL_HOME is the directory where Weblogic is installed) to the $SOA_ORACLE_HOME/j2ee/[instance_name]/connectors/JmsAdapter/JmsAdapter directory, where SOA_ORACLE_HOME is the directory where SOA Suite is installed.

2. Add the following entry (connection factory properties) to oc4j-ra.xml ($SOA_ORACLE_HOME/j2ee/[instance_name]/application-deployments/default/JmsAdapter):

<connector-factory location="[location_of_the JNDI]" connector-name="[Logical_name_of_this_connection_factory]">
<config-property name="connectionFactoryLocation" value="[global-jndi-name-of-your-non-XA-jmsconnectionfactory-in-weblogic]"/>
<config-property name="factoryProperties" value="java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://[host:port];java.naming.security.principal=[username];java.naming.security.credentials=[password]"/<
<config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
<config-property name="isTopic" value="false"/>
<config-property name="isTransacted" value="true"/>
<config-property name="username" value=""/>
<config-property name="password" value=""/>
</connector-factory>


Example:

<connector-factory location="eis/wljms/WLQueue" connector-name="Connection_factory_2_WL">
<config-property name="connectionFactoryLocation" value="pvj/PvjConnectionFactory"/>
<config-property name="factoryProperties" value="java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://[host:port];java.naming.security.principal=[username];java.naming.security.credentials=[password]"/<
<config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
<config-property name="isTopic" value="false"/>
<config-property name="isTransacted" value="true"/>
<config-property name="username" value=""/>
<config-property name="password" value=""/>
</connector-factory>

If it the end-point is a topic, then change the isTopic property to true. For queue, this property will be false.

Since the WebLogic Server does its authentication during JNDI InitialContext creation, we should not specify a value for the "username" and "password" config-property fields. These fields must be present and set to empty strings as shown above. The WebLogic username and password are specified only as the java naming properties as specified above.

Note:

a. The isTransacted config-property value can be set to true or false. If set to true, this tells the JMS adapter to use a JMS transacted session (which means that only JMS operations performed on this JMS session are included in a transaction). Currently, XA integration with WebLogic JMS is not currently supported.

b. For all WebLogic JMS versions, ensure that the JMS adapter ActivationSpec property UseMessageListener is set to false.

c. For enabling transactions across your BPELs/ ESBs, the acknowledgeMode should be set to CLIENT_ACKNOWLEDGE instead of AUTO_ACKNOWLEDGE.

3. WebLogic 9.x changed the JNDI client-side implementation in a way that causes OC4J JNDI lookups to fail. As a result, you must make the following changes to your Oracle
SOA Suite configuration. Failure to do so generates Oracle BPEL Process Manager and Oracle ESB errors related to not finding JMS destinations and transaction errors.

server.xml — ($SOA_ORACLE_HOME/j2ee/[instance-name]/config directory) Add the property environment-naming-url-factory-enabled="true" in the server.xml configuration file for your instance for any application that includes weblogic.jar from WebLogic 9.x as follows:

<application-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd"
localhostIsAdmin="true"
application-directory="../applications"
check-for-updates="adminClientOnly"
deployment-directory="../application-deployments"
connector-directory="../connectors"
environment-naming-url-factory-enabled="true"
schema-major-version="10" schema-minor-version="0">

4. The following two patches on top of 10.1.3.3 are also required for an instance that has Oracle ESB installed (whether it is being used or not):

  • Patch 6081699 - Giving Error For Aqjms If Environment-Naming-Url-Factory-Enabled="True" Prop Set

  • Patch 6316554 - Consume Functionality Of Jms Adapter For Bea Weblogic Does Not Work
  • These 4 steps are enough to connect to Weblogic JMS server using JMS Adapter. I tested it with Weblogic 9.2 and it works perfectly.


    Additional Notes:

    1. Some more points here which initially I have spent time to understand due to terminology differences J is to find out what exactly is “global-jndi-name-of-your-non-XA-jmsconnectionfactory-in-weblogic

    To know this:

    a. Goto Weblogic console: http://host:port/console

    b. Under domain configuration, goto Services section and click on JMS Modules:

    JMSAdapter1.JPG

    c. Then click on one of the available modules you have, by default, only one module will be available unless we create any or any other deployment is done.

    d. In the Resources table, you will find the value of the JNDI name for the connection factory:

    JMSAdapter2.JPG

    2. Now this Connection Factory has to be a NON-XA enabled as Weblogic doesn’t support XA Configuration outside Weblogic (internally it is supported). To find out, if this connection factory is XA-enabled or not, these are steps:

    a. Click on the Connection Factory link to go to the configuration:

    JMSAdapter3.JPG

    b. Click on the Transactions tab to check if this is XA enabled or not:

    JMSAdapter4.JPG

    c. By default, this is checked. Uncheck this and then restart your Weblogic server to make the changes into effect.

    Please note that if this check box is checked, JMS Adapter will NOT be able to produce / consume the messages (in 10.1.3.3, producing the messages works, but consuming doesn’t work. In 10.1.3.4, both producing the messages into WL queue and consuming from the WL queue doesn’t work).

    To view this entry in a PDF, please click here to download the file.

    September 29, 2008

    Creating a new Weblogic Domain.

    Any application server need to provide a requirement to isolate the projects, contents, resources among the development teams in the dev-phase and for managability while in production stage.

    Oracle iAS / OC4J allows the user to create a new instance of container and running them parallely (this can be done using command line as well from the Enterprise manager - will create a entry for this soon).

    Similarly, BEA Weblogic (Oracle Weblogic I mean :) ) also provides us with a way of creating a new instance of container for managability of the code/projects/content/resources. The concept is same but the terminology is different. Weblogic calls it as domain.

    Creating a new domain helps to isolate all the resources allocated to that new domain which also includes development environment (Weblogic calls it as Weblogic Workshop), JVM settings, physical directories, ports, projects and what not. One domain doesnt interfere with another and can parallely. Users have a choice of deploying their projects to one of the domains, except that they need to configure the settings accordingly.

    I have an application to test on Weblogic and I have created 8 domains, and was testing my project in each of the domain with different settings. Ofcourse, my RAM is small, so I need to switch on and off the domains accordingly and at a time, 3 of them were running parallely. It really helped me to test my application in a better and faster way.

    For the beginners or for those who are new to Weblogic, I guess this writing would help in creating a Weblogic domain as a quick reference. Also, included few issues which I encountered while running my application.

    Please feel free to download the PDF here: Download file

    September 12, 2008

    Quick Reference 1 : Client-side JAR Files required for OEMS JMS In-Memory and File-Based Lookup and Database Lookup

    I am planning to write a quick reference section (QR) with all the tips for the programmers / administrators. This will help us to quickly check the list of to-do things. So, this is my first QR.

    This is a quick reference to know what client side jar files are needed to be added in the CLASSPATH when we are trying to use JMS (in-memory/file or database) from an application client (java code or any other 3rd party JMS client). Following are the JAR files needed in the classpath:

    Client-side JAR Files Required for OEMS JMS In-Memory and File-Based Lookup:

    oc4jclient.jar -- $ORACLE_HOME/j2ee/<instance_name>
    jta.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    jms.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    jndi.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    javax77.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    optic.jar -- $ORACLE_HOME/opmn/lib

    (Required only if the opmn:ormi prefix is used in Oracle Application Server environment.)


    Client-side JAR Files Required for OEMS JMS Database Lookup:

    oc4jclient.jar -- $ORACLE_HOME/j2ee/<instance_name>
    ejb.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    jta.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    jms.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    jndi.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    javax77.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    adminclient.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    ojdbc14dms.jar -- $ORACLE_HOME/j2ee/<instance_name>/../../oracle/jdbc/lib
    dms.jar -- $ORACLE_HOME/j2ee/<instance_name>/../../oracle/lib
    bcel.jar -- $ORACLE_HOME/j2ee/<instance_name>/lib
    optic.jar -- $ORACLE_HOME/opmn/lib

    (Required only if the opmn:ormi prefix is used in Oracle Application Server environment.)

    Note: If you cant find jndi.jar in the above specified location, then it should be there available in $ORACLE_HOME/datadirect/sun/lib directory.

    This quick reference should be helpful when programming with OC4J JMS.

    August 26, 2008

    Telecommunications Setup example

    This is a typical example of the telecommunications setup.

    TelecommunicationSystems.jpg

    I will try to explain this picture. Imagine a telecommunication copmany - OraCell - wants to sell their services such as telephone services, broadband services, GSM services, VOIP services etc to their customers. In Oracell terms, all the services are called as products. But in the customers' terms, they are termed as services.

    A CSR (Customer Service Respresentative) calls a Customer (or Customer calling the Oracell Callcenter) and enquires about a service / product. The CSR looks at all the products, describing each to the Customer, providing the choice to the customer. Customer purchases one of the product and ask the CSR to activate the same.

    Please note that the grammer changes accordingly dependending on the product. For example, if it is a landline, purchasing a plan is different from installing the telephone physically at the customer's location. Both are different actions. Once the order is taken, and entered into the systems and amount is paid by the Customer for the installation charges, it is called fulfillment.

    Oracell would then send a representative to the Customer's location to install the telephone, setup the appropriate equiment if needed and then activating the phone service is done. This is called provisioning of the service.

    Incase of other services like :
    - GSM - selling the SIM Card and activation,
    - Broadband - selling the modem, setting up of the modem, issuing static/dynamic IP address and activation of the service
    - VOIP - Issuing VOIP phone, issuing VOIP card, activating the service

    these actions are fulfillment and provisioning of the orders taken by the CSR.

    Activation (Provisioning) of the service would also mean that the system will enable the number given to the customer to all the mobile towers (Antennas) so that if the customer calls, his number would be on the line and is enabled to go across different towers.

    Once the service is activated, the CRM system (or provisioning system - depends on the setup) sends a signal to the billing system to start billing.

    Now, say the customer starts his first call. As he dials his first number, this will first come to OraCell's PSTN. OraCell has different switches setup already for different purposes (Switches are also called Network elements in telecommunications terminology). This switch puts the customer's call to the appropriate line and then talk to the provisioning system to know the Customer's plan. It then starts recording the information such as which number Customer has dialled, how many minutes did he talk, is it STD or ISD or local number, which area he dialled etc.

    All this information is recorded into files called as CDR (Call Data Records). This file has maximum limit. Once this is filled up, another new file is written. All such CDRs are given to a software called as Mediator(Mediation). Mediator would read all the information, remove invalid entries information and pass this information to the billing systems.

    Billing system would generate the bill for the customer based on his service usage, then calculate the discount according to his plan and generate the final bill and update the CRM system to display it to the Customer.

    Mediation can also send the data to InterConnect systems and Data Mining databases so that appropriate reports can be generated accordingly and then looked upon by the OraCell's management.

    Also, fulfillment systems looks into the inventory system to check the availability and the status of the products.

    It is very hard to make the communication between all these software pieces. The Administrator needs to know the best of the softwares and also the interfaces of those software to make them communicate to each other and pass the information between them. The development, maintainability, reliability of these softwares are high since most of the times, the company develops legacy applications for such setup. Few very companies in the market are there which markets softwares for the above components.

    Oracle AIA communications PIPs provides the above software pieces (not all of them) and also aids the communications between these components.

    Next time, we will see how AIA helps in such scenarios.