Search This Blog

Monday, February 21, 2011

Configuring GridLink DataSources

WebLogic 10.3.4 is having new feature as High availability and fail over control with Oracle Notifying Service (ONS) as client at WebLogic sever side. Which enables your environment to track if one of RAC node is down or Listener down.

edit()
cd('/')
cmo.createJDBCSystemResource('ds1')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1')
cmo.setName('ds1')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDataSourceParams/ds1')
set('JNDINames',jarray.array([String('GLDS01')], String))

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDriverParams/ds1')
cmo.setUrl('jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=dbhost.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)
(HOST=dbhost.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORASERVICE)))\r\n\r\n')
cmo.setDriverName('oracle.jdbc.OracleDriver')
cmo.setPassword(DBPASS)

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCConnectionPoolParams/ds1')
cmo.setTestTableName('SQL SELECT 1 FROM DUAL\r\n\r\n')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDriverParams/ds1/Properties/ds1')
cmo.createProperty('user')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDriverParams/ds1/Properties/ds1/Properties/user')
cmo.setValue('DBUSER')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDataSourceParams/ds1')
cmo.setGlobalTransactionsProtocol('TwoPhaseCommit')
 
cd('/SystemResources/ds1')
set('Targets',jarray.array([ObjectName('com.bea:Name=appclstr,Type=Cluster')], ObjectName))

 cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCOracleParams/ds1')
cmo.setFanEnabled(true)
cmo.setOnsNodeList('node1host.com:6200,node2host.com:6200')

save()
activate()


Before you configure this, make sure ONS service configure at RAC nodes. So, please confirm it from your ORACLE DBA. One more things, this is applicable only when your environment have Oracle Database 10.2.+ for RAC.






This GridLink datasource is the alternative for Multi datasource. You don't need to configure individual data sources for each node. In this GridLink you can enter all the RAC node details at once. Targeting and testing is same as generic data source you can verify on your WebLogic console.

Best References
1. http://download.oracle.com/docs/cd/E17904_01/web.1111/e13737/gridlink_datasources.htm
2. http://www.cnblogs.com/mengheyun/archive/2011/02/13/1953114.html
3. http://theblasfrompas.blogspot.com/2011/02/jruby-script-to-monitor-oracle-weblogic.html
4. http://www.youtube.com/watch?v=THBUr_x7mUE
5. http://www.youtube.com/watch?v=5icksYdkj-c

Thursday, February 17, 2011

OEPE the best WLST Editor


Now we have, Oracle given a nice GUI editor for WLST scripts. I started looking about it one of my blog commenter Lukas was asked me about it. Oracle released two versions of this Eclipse editor:
  1. Eclipse 3.6 (Helios) Edition
  2. Eclipse 3.5.2 (Galileo) Edition
It has built support for Python scripts and PyDev. Recently I had downloaded new OEPE-Galileo-All-In-One-11.1.1.6.0.201007221355-Win32.Zip. It is really “All in One” why because it has connectivity to WebLogic Server Local/Remote options with all categories of versions supported by WLST. It is included WLST MBean Explorer, built-in WLST Help provided in one of tab.

Here I am going to tell about that what you need to look in this because introductory blog already given by Edwin Biemond from Oracle
OEPE for WLST 

Video blog...
There is nothing to know about much about hidden MBean hierarchies. WLST on OEPE (Eclipse) makes more fun in creating new scripts. More over the OEPE Templates are awesome!! God bless this template creator.  Oracle WLST people given commonly used scripts as templates. Which makes you no efforts to write the line-by-line script writing. GUI makes more work in less time meaning increasing productivity and performance!!!

Ready made Templates
OEPE gave us the following templates as ready-made script templates. You need to change the values or parameters to whatever you want to name for your environment or WebLogic domain. 

  1. Default: WLST online
  2. Create Basic WebLogic Domain
  3. Create WebLogic Cluster
  4. Create WebLogic Domain with JMS and JDBC Resources
  5. Configuring JMS System Resource
  6. Configuring JDBC DataSource Delete  JDBC Data Source
  7. Delete JMS System Resource
  8. Delete WebLogic Cluster
You might be using WebLogic portal or WebLogic Integration or some other WebLogic domain these are core common scripts templates can be applicable to any of them.



Most of the developers requires the Deleting JDBC resources and want to create a fresh DataSource with changed database parameters.

In production environment some of the sites you might need to remove the machines due to their utter performance. “Delete WebLogic Cluster” is the wonderful script for you. You need to give the managed servers list, cluster(s) you want to remove from the domain.
Cons of OEPE
  1. To run OEPE on your desktop requires good amount of MEMORY (RAM).
  2. Sometimes iexplorer stuck you cannot open OEPE anyway it is Windows issue.
  3. JVM Settings of eclipse.ini file need to be updated according to your operating environment. Anyway I found the best reference to solve JVM settings issue at stackoverflow.com
Expecting more exciting things from WLST users so…keep writing your comments, updates about OEPE using WLST.




In these amazon ads you can click on 'Look inside' give you some idea about the above books. And don't forget to enjoy the sample chapters of these books.

While working on eclipse there could be need to pass arguments to your WLST script. Yes!! You can do that goto Run As options select Run Configuration. In the Run Configuration window select the Arguments tab,  you can give Program Arguments.

Good References:
1. http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html
2. http://biemond.blogspot.com/2010/08/wlst-scripting-with-oracle-enterprise.html
3. http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse

Popular Posts