Saturday, June 30, 2012

how to setup JConsole for Oracle Oracle WebLogic Server

Hi Everyone,

We all know JConsole is part of JDK, it can be found in $JAVA_HOME/bin directory, and this utility can be used as JMX Console for Managing WebLogic Server, Where you can see the WebLogic Server configuration and invoke various MBean operations, it helps to view and edit the MBean configuration and invoke various JMX Operations on the serverRuntime, serverConnfig and domainRuntime

Here in this post we will see how to setup JConsole for WebLogic Server 10g.

As JConsole is free and distributed with JDK, there is no need of downloading it seperately

We will follow simple steps to setup the JConsole for WebLogic Server
JConsole works in two modes :
  1. Local Process Mode -> Checks for Local Java Process to Manage them through console
  2. Remote Mode ->We Can provide JMX URL to Manage the Remote Java Process
We Normally Use Remote mode as we need to connect the JConsole to MBean Server of WebLogic Application Server

Step 1. Start WebLogic Admin Server
 
Step  2. Login to Admin Console and check the domain configuration


Fig 2. Check Domain's Advanced Configuration as The MBean Servers are enabled or not
Step 3. Check for the Parameters "Compatibility MBean Server Enabled" and "Management EJB Enabled" Status ( They Should be Enabled - By Default They are enabled)


 
Step 4. Check The Configuration at Admin Server Side in Ports Tab - > IIOP


Fig 4. IIOP Should be enabled in Admin Server IIOP Port Configuration


Fig 5. Provide some user name and password (preferable weblogic/weblogic), as Anonymous users are not allowed to connect to the JMX MBean Server (Advanced Options in IIOP)


Step 5. Save and Activate Changes - This Needs Restart of the Admin Server.










Notice that the logs at the startWebLogic.cmd command window shows as below

The non-dynamic attribute DefaultIIOPPasswordEncrypted on weblogic.management.configuration.ServerMBeanImpl@453b029e([ProdDomain]/Servers[AdminServer]) has been changed. This may require redeploying or rebooting configured entities
change has been made which affects the server AdminServer. This server must berebooted in order to consume this change

Step 6. Restart the Admin Server


Step 7. Start JConsole - Execute following Steps and Verify the output

F:\>echo %WL_HOME%
F:\Oracle\Middleware\wlserver_12.1

F:\>echo %JAVA_HOME%
F:\Oracle\Middleware\jdk160_29\bin
 
F:\>cd %WL_HOME%

F:\Oracle\Middleware\wlserver_12.1>cd server

F:\Oracle\Middleware\wlserver_12.1\server>cd bin

F:\Oracle\Middleware\wlserver_12.1\server\bin>setWLSEnv.cmd


Step 8. Execute the following command to invoke "jconsole remote"

jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%WL_HOME%\server\lib\wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote

Step 9. We will get to see the console as below.


 
Fig 9 . JConsole Login Screen
Step 10. Please provide Service JMX URL for Admin Server and Specify the MBean Tree to enter as below and their particular JConsole Space.


1. service:jmx:rmi:///jndi/iiop://localhost:7011/weblogic.management.mbeanservers.domainruntime


username/password = weblogic/weblogic

 3. service:jmx:rmi:///jndi/iiop://localhost:7011/weblogic.management.mbeanservers.edit
username/password = same as above





Fig 12. JConsole Edit Session in Edit Tree.


This is it..!!

Please let me know if you have any feed back suggestion here


Thanks for Visiting My Blog - Please Share your feed back and ideas.
Enjoy working with middleware....

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com


Friday, May 11, 2012

Changing Oracle SOA Suite 11G default Data Source (Repository) Passwords on weblogic and Database level.

Hi Everybody,

Few days back, i came across situation where have to change passwords for SOA suite datasources. So today we will discuss about by default Data-sources on Oracle SOA 11G.
     
There are a number of component services installed and configured to use an Oracle Weblogic JDBC Data Source out of the box.  In this post we will discuss about those data sources and how to modify their passwords at the RDBMS level and also the Oracle Weblogic mid-tier level

By default the Oracle SOA Suite 11G installs and configures a number of JDBC data sources at the mid-tier Weblogic level.  They are also used by Oracle Fusion Applications.  These are;





  






In order to change the passwords for any or all of these connections there are two steps to follow;

STEP 1. ORACLE WEBLOGIC LEVEL PASSWORD CHANGE

1) Login to http://host.domain:port/console as the weblogic user.
2) On the left is the Environment structure.  Expand the Domain if it is not already, then click on SERVICES
3) Now click into JDBC
4) Then click into Data Sources to see a table on the right of all the Oracle Weblogic managed JDBC data sources.
5) Click on the name for one of the above data sources.  In this example we'll assume the first one, BAMDataSource
6) You're now in the BAMDataSource configuration page, showing multiple sub tabs.  Click on Connection Pool.
7) Here you'll see the jdbc driver and a 'properties' field.  The username will be visible, ie: user=TEST_ORABAM.

    NOTE: These user or RDBMS schema names will have been defined during the configuration stage of installation.  The RCU or Repository Creation Utility will have requested you give prefixes such as DEV, TEST, UAT, QA, PROD etc - depending on your situation.

8) Below the 'properties' field you will see the 'password' field.  The password will be displayed as dots at this time.
9) In order to change the password at the Weblogic level, you have to provide the new password which you defined using Step 2 below.  Ensure that sufficient backups have been taken and that you are able to make a password change in a suitable downtime window.  At a convenient outage time, enter the new password from Step 2, then click the SAVE button.
10) Ensure the Target Weblogic managed servers (soa_server(x) for example) are started and then with the new password changed, click on the MONITORING tab, then the TESTING subtab.
11) You can now select a managed server and click the TEST DATA SOURCE button for it to login as the user of that data source (TEST_ORABAM) and make a select from dual to validate the connection.


Upon success you have now changed the passwords at the RDBMS level, and also at the mid-tier level for that component.  

STEP 2. RDBMS LEVEL PASSWORD CHANGE

Depending on the component data source identified in Step 1 above, you need to login to your rdbms layer as that schema username and password.  eg; TEST_ORABAM in this case.  If you are not the DataBase Administrator for this system then please work with your DBA if you do not have sufficient RDBMS level administration rights to login as this user. 

1) Login as the data source user using any relevant tool like SQL*_Plus, SQL Developer
  
 To change the password for this user the sql statement is;
    ALTER USER TEST_ORABAM identified by Welcome1;
    COMMIT;

    where <username> is the data source user= property, and <newPassword> is the new password you've chosen.


Once the commit command has reported success then the password has been changed at the RDBMS level.

You can now complete step 1 above and provide this new password to the data source password property field.  You can now start-up the respective Oracle Weblogic managed servers to ensure everything is satisfactory.

I Hope this will help you in your assignment.You can write me on middlewaresolution1@gmail.com.

Enjoy Working with Middleware.

Regards,
Ajinkya Vichare

ajinkya-vichare.blogspot.com

 

Sunday, March 18, 2012

Introduction and Features of Oracle Service Bus


Hi Friends,

I have started some hands on OSB i.e . (Oracle Service Bus) for my new project.so have found some intro and features of OSB.

So today we will talk about introduction of Oracle Service Bus and itz features...

Oracle Service Bus (OSB) :

Oracle Service Bus is at the heart of Oracle’s comprehensive business integration solution and belongs to the Oracle Messaging product line.

Oracle Service Bus is primarily targeted for managing different types of services, and providing traditional message brokering across heterogeneous IT environments.

Oracle Service Bus is a proven market-leading Enterprise Service Bus (ESB) built from the ground up for SOA lifecycle management that provides foundation capabilities for service discovery and intermediation, rapid service provisioning and deployment, and governance.

Oracle Service Bus is a proven, lightweight and scalable SOA integration platform that delivers low-cost, standards-based integration for high-volume, mission critical SOA environments.

It is designed to connect, mediate, and manage interactions between heterogeneous services, legacy applications, packaged applications and multiple enterprise service bus (ESB) instances across an enterprise-wide service network.

Oracle Service Bus provides built-in management and monitoring capabilities and supports out-of-the-box integration with SOA Governance products.

Functional Features of OSB :
The functional features of Oracle Service Bus can be categorized into the following functional layers:
  • Messaging Layer: that reliably connects any service by leveraging standards web service transports, traditional messaging protocols and configuration of enterprise-specific custom transports.
  • Security Layer: a rapid service configuration and integration environment that abstracts policies associated with routing rules, security, and service end-point access.
  • Composition Layer: a meta-data driven feature-rich configuration interface for service discovery and validation capabilities for automatic import and synchronization of services with UDDI registries, allows message flow modeling, transformations, third-party service callouts and a test console.
  • Management Layer: a service management environment that includes dynamic service and policy configuration, centralized usage and performance monitoring, and management of services - not just Web services, but also Java, .Net, messaging services, and legacy end points.

Feature Benefits (OSB):
Oracle Service Bus Features and Benefits :

Functionality
Functional Feature
Business Benefit


Message Routing
Configuration-driven intelligent, content-based and identity-based routing
Rapidly respond to business needs by quickly configuring routing rules based on changes to business rules or existing IT systems, without coding

Message Transformation
Dynamic message transformation based on XQuery or XSLT, supporting multiple message formats
Flexibly adapt to evolving SOA and integration project scenarios through the ability to dynamically transform and route services using simple and/or complex routing rules and/or message payloads

Service Registry
Automated or administrator-driven interoperability with UDDI V3 registries for service publishing and reuse
Increase ease of re-use by automatically discovering existing services and exporting new services to the service registry

Service Provisioning
Simplified service provisioning
Increase ease of managing multiple versions of services, simplify and speed deployments by eliminating build-test development cycles

Message Security
Optimized, pluggable, policy-driven transport and message level security
Leverage existing investments in security infrastructure and seamlessly broker between multiple security frameworks

Service End-point Interoperability
Extensibility and expanded service end-point support
Extend solution to accommodate unique IT requirements using infrastructure with certified interoperability with multiple standards, protocols, and vendors

Service Level Agreements
Rules-driven, configurable Service Level Agreement (SLA) enforcement
Gain visibility and control by enabling users to set SLAs based on a number of factors and alerts when the SLAs are not met

Message Transport
Extensible support for heterogeneous transports between service end points including custom transports via the Custom Transport SDK
Provides flexibility to leverage existing investments in disparate systems and/or ensure smooth transition from older to newer systems

Message Brokering
WS-I compliant Intelligent messaging brokering with support for multiple transport types, message formats
Ensure investment protection and leverage existing infrastructure through the ability to orchestrate services from existing IT systems with disparate messaging protocols without needing to change the systems and styles

Service Availability
Proactive infrastructure health and availability monitoring with JMX and SNMP
Maintain health and availability of the SOA through easy configuration of support of performance metrics and SLAs using a built-in, feature-rich dashboard OR 3rd party performance management systems.

Service Monitoring Dashboard
Flexible, graphical, and embedded management and monitoring dashboard
Automatically monitor and manage status of performance metrics and SLAs using a built-in, feature-rich dashboard or 3rd party performance management systems. Proactively take corrective action based on alerts.

Service Deployment
Easy, customizable programmatic or console-driven deployment
Ability to enforce governance and speed deployments



























































It's just an introduction for Oracle Service Bus. I hope it helps you in understanding OSB.



Regards,
Ajinkya Vichare

Configure log4j in weblogic server


Hello Everyone,

Today we will discuss about Configure log4j in weblogic server :

Step 1. Copy log4j-1.2.9.jar & wllog4j.jar under domain_root/lib folder.

Step 2. Create log4j.xml and drop it under domain_root folder. If you have log4j.xml inside the application(EAR/WAR), I would recommend to move outside EAR/WAR as
changing severity (log level) would require re-deployment. To avoid this, we can move log4j.xml into domain root folder but again the server needs to be bounced.
But there is a fix.

Step 3. Login to weblogic server console. Go to Servers -> Admin Server-> Logging.
Click on advanced mode. Change the logging implementation from JDK to Log4J. 


Click save.

Step 4. Activate changes. Re-start the admin server.

This should enable log4j and should write logging into log file mentioned in log4j.xml or properties file.

Hang on! There is a catch here. Say now I want to change the log level from DEBUG into WARN or ERROR. 


How do i do? 

We go to log4j.xml and change the level.
Now how does this change take into effect? It needs bouncing of the server.
I have given below sample log4j.xml for your reference...

log4j.xml:
 <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE log4j:configuration SYSTEM
"log4j.dtd">
<log4j:configuration>
 <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
   <layout class="org.apache.log4j.PatternLayout">
     <param name="ConversionPattern"
            value="%d [%t] %-5p %c - %m%n"/>
   </layout>
 </appender>
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
   <param name="File" value="/log/myApp.log"/>
   <param name="Append" value="true"/>
   <layout class="org.apache.log4j.PatternLayout">
     <param name="ConversionPattern" value="%d{ISO8601} %t %-5p %c{2} - %m%n"/>
   </layout>
 </appender>
 <logger name="org.apache">
   <level value="WARN"/>
 </logger>
 <logger name="org.springframework">
   <level value="WARN"/>
 </logger>
 <root>
   <level value="DEBUG"/>
   <appender-ref ref="FILE"/>
<!--   <appender-ref ref="CONSOLE"/> -->
 </root>
</log4j:configuration>
I have disabled log4j to write into weblogic console by commenting out. If you want it enable den you can do it by uncommenting

I hope it will help you in configuring log4j in weblogic server. And would also like to thank google and peoples who shares their views on the same.

Enjoy working in Middleware.....

Regards,
Ajinkya Vichare


ajinkya-vichare.blogspot.com