This document provides an overview of WebLogic Scripting Tool (WLST) and how it can be used to administer WebLogic Server domains. WLST uses Jython as its scripting language and allows both interactive and scripted administration of domains. It works through JMX to manage WebLogic Server MBeans. Key capabilities include browsing runtime MBeans, creating and configuring domains, managing clusters and servers, and modifying security configurations both online and offline. Scripts can be used to automate common administrative tasks.
Slides for presentation on ZooKeeper I gave at Near Infinity (www.nearinfinity.com) 2012 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/zookeeper-samples
Slides for presentation on ZooKeeper I gave at Near Infinity (www.nearinfinity.com) 2012 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/zookeeper-samples
This slide deck describes the Flexviews materialized view toolkit for MySQL:
http://flexvie.ws
Learn how to use incrementally refreshable materialized views, and how they can improve your performance.
This presentation is for those who are familiar with databases and SQL, but want to learn how to move processing from their applications into the database to improve consistency, administration, and performance. Topics covered include advanced SQL features like referential integrity constraints, ANSI joins, views, rules, and triggers. The presentation also explains how to create server-side functions, operators, and custom data types in PostgreSQL.
MySQL Replication Overview -- PHPTek 2016Dave Stokes
MySQL Replication has been around for a long time but are you up to date on the latest updates such as multi-source or group replication? Can you explain the differences between GTID and non-GTID replication? This is a quick 30 minute overview of MySQL replication as of 5.7
This slide deck describes the Flexviews materialized view toolkit for MySQL:
http://flexvie.ws
Learn how to use incrementally refreshable materialized views, and how they can improve your performance.
This presentation is for those who are familiar with databases and SQL, but want to learn how to move processing from their applications into the database to improve consistency, administration, and performance. Topics covered include advanced SQL features like referential integrity constraints, ANSI joins, views, rules, and triggers. The presentation also explains how to create server-side functions, operators, and custom data types in PostgreSQL.
MySQL Replication Overview -- PHPTek 2016Dave Stokes
MySQL Replication has been around for a long time but are you up to date on the latest updates such as multi-source or group replication? Can you explain the differences between GTID and non-GTID replication? This is a quick 30 minute overview of MySQL replication as of 5.7
DURGASOFT is INDIA's No.1 Software Training Center offers online training on various technologies like JAVA, .NET, ANDROID,HADOOP,TESTING TOOLS , ADF, INFORMATICA,TALLEAU,IOS,OBIEE,ANJULAR JA, SAP...courses from Hyderabad & Bangalore - India with Real Time Experts.
WhiteHedge is New Jersey, US based company that is Docker certified consulting and training partner. WhiteHedge also has partnered with Chef and contributes to Chef OS.
Docker containers and Chef are very popular tools. Learn how to use Chef and Docker together for effective DevOps.
Presentation by Matt Brasier, C2B2 Principal Consultant, delivered at DOAG German Oracle User Group Conference on the 20th of November 2014 in Nuremberg.
One of the most often overlooked, and yet most powerful features of WebLogic is WLST, the WebLogic Scripting Toolkit.
This jython based library allows you to connect to and interact with a weblogic domain; making configuration changes, deploying applications, creating new servers and doing anything else that you might do through the console.
By scripting our domain builds and deployments, we can control our configuration and provide increased confidence in our ability to rebuild an environment in a DR scenario, and with automated deployment tools like puppet gaining traction in DevOps circles, the ability to completely script both the creation of the domain, and deployment of the application gives us great power.
This presentation will look at how WLST can be used to build a domain, deploy an application, and then provide runtime monitoring.
Through the magic of virtualization technology (Vagrant) and Puppet, a companion Enterprise grade provisioning technology, we explore how to make the complex configuration game a walk in the park. Bring new team members up to speed in minutes, eliminate variances in configurations, and make integration issues a thing of the past.
Welcome to the new age of team development!
Cloud Application Blueprints with Apache Brooklyn by Alex Henevaldbuildacloud
So you have your cloud running, what now? Extend the devops agility from infrastructure to applications by learning how to use Brooklyn, the Apache-incubating project for application management. Create blueprints for applications to enable one-click deployment into Cloudstack, Docker, localhost, or other targets. Leverage your favourite server management tools, from Bash to Chef. Automatically change the deployment after it's deployed. Attach policies to support scaling, failover, and alerting in the way your application needs.
In this session we'll show how with just a few lines of YAML, you can build powerful application blueprints by composing pre-existing components, from polyglot web stacks to big data tools such as Riak. We'll also cover defining new blueprints using custom scripts, configuring machine selection and runtime policies, and managing new locations such as Clocker -- the cloud of docker.
About Alex Henevald
Alex brings twenty years experience designing software solutions in the enterprise, start-up, and academic sectors. Most recently Alex was with Enigmatec Corporation where he led the development of what is now the Monterey® Middleware Platform™. Previous to that, he founded PocketWatch Systems, commercialising results from his doctoral research. Alex holds a PhD (Informatics) and an MSc (Cognitive Science) from the University of Edinburgh and an AB (Mathematics) from Princeton University. Alex was both a USA Today Academic All-Star and a Marshall Scholar.
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptDave Stokes
The MySQL Shell has a JavaScript mode where you can use JS libraries to access you data and you can also write (and save) your own custom reports (or programs) for future use.
Slides of the Belgian Puppet User Group Meetup "something about MCollective" we held on the 24 of June 2014.
The source of these slides can be found at https://github.com/witjoh/BPUG_MCollective
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesKenny Gryp
MySQL InnoDB Cluster provides a complete high availability solution for MySQL. MySQL Shell includes AdminAPI which enables you to easily configure and administer a group of at least three MySQL server instances to function as an InnoDB cluster.
This talk includes best practices.
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...Codemotion
Uno degli argomenti più importanti per chi utilizza wordpress è la condivisione dello stesso server, brutto a dirsi ma in questo settore si tende ad installare su una sola macchina un numero molto alto di siti. Vediamo come Docker può venirci incontro per organizzare al meglio le nostre installazioni e come può diventare un opportunità per gestire al meglio le risorse anche in vista di una crescita improvvisa e di una necessità di scalata orizzontale.
ConFoo MySQL Replication Evolution : From Simple to Group ReplicationDave Stokes
MySQL Replication has been around for many years but how wee do you under stand it? Do you know about read/write splitting, RBR vs SBR style replication, and InnoDB cluster?
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
MySQL Replication has evolved since the early days with simple async master/slave replication with better security, high availability, and now InnoDB Cluster
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
AI Genie Review: World’s First Open AI WordPress Website CreatorGoogle
AI Genie Review: World’s First Open AI WordPress Website Creator
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-genie-review
AI Genie Review: Key Features
✅Creates Limitless Real-Time Unique Content, auto-publishing Posts, Pages & Images directly from Chat GPT & Open AI on WordPress in any Niche
✅First & Only Google Bard Approved Software That Publishes 100% Original, SEO Friendly Content using Open AI
✅Publish Automated Posts and Pages using AI Genie directly on Your website
✅50 DFY Websites Included Without Adding Any Images, Content Or Doing Anything Yourself
✅Integrated Chat GPT Bot gives Instant Answers on Your Website to Visitors
✅Just Enter the title, and your Content for Pages and Posts will be ready on your website
✅Automatically insert visually appealing images into posts based on keywords and titles.
✅Choose the temperature of the content and control its randomness.
✅Control the length of the content to be generated.
✅Never Worry About Paying Huge Money Monthly To Top Content Creation Platforms
✅100% Easy-to-Use, Newbie-Friendly Technology
✅30-Days Money-Back Guarantee
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIGenieApp #AIGenieBonus #AIGenieBonuses #AIGenieDemo #AIGenieDownload #AIGenieLegit #AIGenieLiveDemo #AIGenieOTO #AIGeniePreview #AIGenieReview #AIGenieReviewandBonus #AIGenieScamorLegit #AIGenieSoftware #AIGenieUpgrades #AIGenieUpsells #HowDoesAlGenie #HowtoBuyAIGenie #HowtoMakeMoneywithAIGenie #MakeMoneyOnline #MakeMoneywithAIGenie
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
2. Weblogic- WLST-SCRIPTING
What is WLST ?
WebLogic Scripting tool. This was introduced in weblogic 9.2 . Prior to this
weblogic.Admin java utility was used extensively for command line administration of
weblogic.
WLST uses Jython as scripting language. Jython is pure java based implementation of
Python.
Invoking the WLST script:
Java weblogic.WLST
Or
$WL_HOME/common/bin/wlst.sh
This script will internally invoke the previous command java weblogic.WLST.
NOTE: make sure you are sourcing the environment before executing the WLST.
# . $DOMAIN_HOME/bin/setDomainEnv.sh # ( dot space script location)
How WLST works ?
It works through JMX ( Java Management Extension). The API to managed the
Mbeans ( Management Beans)
Two modes of WLST
Online : this is when connected to a running admin/managed server
Used to browse through the runtime Mbeans of the weblogic
Can change security configuration of the domain
Query the runtime mbeans
Offline : When not connected to running weblogic.
Creation of domain and changing the configuration
3. Weblogic- WLST-SCRIPTING
Can not change security configuration in this mode…
Template based domain creation.
WLST Basics:
Total Domain is divided into various Tree line verticals.
domainConfig() serverConfig() domainRuntime() serverRuntime() Edit()
Online Online Online Online Online
Similar to the configuration information, WebLogic Server runtime MBeans are arranged
in a hierarchical data structure.
When connected to an Administration Server, you access the runtime MBean hierarchy
by entering the serverRuntime or the domainRuntime command.
The serverRuntime command places WLST at the root of the server runtime
management objects, ServerRuntimeMBean; the domainRuntime command, at the root
of the domain-wide runtime management objects, DomainRuntimeMBean.
When connected to a Managed Server, the root of the runtime MBeans is
ServerRuntimeMBean.
The domain runtime MBean hierarchy exists on the Administration Server only; you
cannot use the domainRuntime command when connected to a Managed Server.
serverRuntime() & domainRuntime() are read-only trees. These two trees are run-time
related trees.
With in each tree you can browser through
Domain Mbean – (root)
| ---- Mbean Type ( ServerMBean)
|-- Mbean Instance
( wl_mng1)
|-- Mbean attributes & Operations
( port no, listen address, start/stop)
4. Weblogic- WLST-SCRIPTING
|-- Mbean Instance
( wl_mng2)
|--Mbean attributes & Operations
Types of using WLST :
1) Interactive ( browsing through the Mbean structure)
cd()
ls()
help(‘command-name’)
cd(configuration-tree-name)
ls()
directories are the Mbeans ( start with dr)
-r— files are attributes
–r—x files are operations
attributes can be changed using set & get commands.
2) Invoking a script from command line.
The script should have an extension .py to be able to invoke from command
line.
$ Java weblogic.WLST –skipWLSModuleScanning ( run
$DOMAIN_HOME/bin/setDomainEnv.sh before invoking WLST to setup the
environment)
Invoking WLST can be invoked in two ways.
1) $WL_HOME/common/bin/Wlst.sh
connect()
java weblogic.WLST -skipWLSModuleScanning wlst-application-status.py
localhost:10001 weblogic weblogic
5. Weblogic- WLST-SCRIPTING
Redirection of output :
redirect(outputFile,[toStdOut])
stopRedirect()
CMO. – current management object
After cd(), u can get the properties by calling cmo.operation
creating a domain template
readDomain('/home/durgasoft/domains/DurgaSoft_Dmn')
writeTemplate('/home/durgasoft/mytemplate.jar')
closeDomain()
6. Weblogic- WLST-SCRIPTING
createDomain('/home/durgasoft/mytemplate.jar','/home/durgasoft/domains/new-
domain','wlsadmin','wlsadmin')
otherway is to use this template with config.sh script…2nd step
alternative way is
configToScript(‘domain-directory’,’location-for-scripts’)
dumpVariables()
dumpStack()
after ls() there will be both properties & Operations
Properties will not have x ( -r---). where as operations will have –r-x
To acquire a lock and edit the configuration of the domain
edit()
startEdit()
save()
activate(block=”true”)
import X imports the module X, and creates a reference to that module in
the current namespace. Or in other words, after you’ve run this statement,
you can use X.name to refer to things defined in module X.
from X import * imports the module X, and creates references in the
current namespace to all public objects defined by that module (that is,
everything that doesn’t have a name starting with “_”). Or in other words,
after you’ve run this statement, you can simply use a plain name to refer to
things defined in module X. But X itself is not defined, so X.name doesn’t
work. And if name was already defined, it is replaced by the new version. And
if name in X is changed to point to some other object, your module won’t
notice.
from X import a, b, c imports the module X, and creates references in the
current namespace to the given objects. Or in other words, you can now
usea and b and c in your program.
7. Weblogic- WLST-SCRIPTING
Finally, X = __import__(‘X’) works like import X, with the difference
that you 1) pass the module name as a string, and 2) explicitly assign it to a
variable in your current namespac
Prompt()
sys.ps1="myprompt>"
cmo- is current management object. You can use get or set methods to retrive/assign
properties to the current management object using this.
scripts
1) Script to Check the Status of All the deployed Applications
Wlst-application-status.py
How to Invoke : java weblogic.WLST –skipWLSModuleScanning wlst-
application-status.py
#This wlst script give the status of the deployed applications
import os
import sys
username='weblogic'
password='weblogic'
url='t3://localhost:7001'
connect(username, password, url)
print ' Application Deployed '
cd("AppDeployments")
app = ls(returnMap='true')
domainRuntime()
cd("AppRuntimeStateRuntime/AppRuntimeStateRuntime")
i=1
for appName in app:
appState = cmo.getIntendedState(appName, "mycluster")
print appName + '' + '==>' + appState
i=i+1
8. Weblogic- WLST-SCRIPTING
2) Script for resetting administrator’s password for a weblogic domain
wlst-admin-password-change.py
How to Invoke : java weblogic.WLST –skipWLSModuleScanning wlst-admin-
password-change.py
DomainName = "mydomain"
ADMINUrl = "t3://localhost:7001"
ADMINuser = "weblogic"
oldPassword = "weblogic"
newPassword = "weblogicadmin"
print ' ---- Changing the Administration Password ------- '
print ' '
connect(ADMINuser,oldPassword,ADMINUrl)
cd('/SecurityConfiguration/'+DomainName+'/Realms/myrealm/AuthenticationProviders
/DefaultAuthenticator')
cmo.resetUserPassword(ADMINuser,newPassword)
print ' ---- Weblogic Admin Password Reset Completed Successfully --- '
print ' '
disconnect()
print ' '
print ' --- Testing with the new Credentials --- '
print ' '
connect(ADMINuser,newPassword,ADMINUrl)
print '--- Testing with the new Credentials Completed Successfully ---'
9. Weblogic- WLST-SCRIPTING
print ' '
disconnect()
3) Cluster Creation ( cluster_creation.py)
How to Invoke : java weblogic.WLST –skipWLSModuleScanning
cluster_creation.py
DurgaSoft# cat cluster_creation.py
# This example script:
# * connects WLST to the Admin Examples Server
# * starts an edit session
# * creates 10 managed servers.
# * It creates 2 clusters and assigns the servers to the respective clusters.
from java.util import *
from javax.management import *
import javax.management.Attribute
print 'starting the script ....'
username = 'weblogic'
password = 'weblogic'
clusters = 'cluster1','cluster2'
ms1 = {'managed1':7701,'managed2':7702,'managed3':7703, 'managed4':7704,
'managed5':7705}
ms2 = {'managed6':7706,'managed7':7707,'managed8':7708, 'managed9':7709,
'managed10':7710}
10. Weblogic- WLST-SCRIPTING
connect(username,password,'t3://localhost:7001')
clustHM = HashMap()
edit()
startEdit()
for c in clusters:
print 'creating cluster '+c
clu = create(c,'Cluster')
clustHM.put(c,clu)
cd('....')
clus1 = clustHM.get(clusters[0])
clus2 = clustHM.get(clusters[1])
for m, lp in ms1.items():
managedServer = create(m,'Server')
print 'creating managed server '+m
managedServer.setListenPort(lp)
managedServer.setCluster(clus1)
for m1, lp1 in ms2.items():
managedServer = create(m1,'Server')
11. Weblogic- WLST-SCRIPTING
print 'creating managed server '+m1
managedServer.setListenPort(lp1)
managedServer.setCluster(clus2)
save()
activate(block="true")
disconnect()
4) Cluster Deletion Script ( cluster_deletion.py)
How to invoke it : java weblogic.WLST –skipWLSModuleScanning cluster_deletion.py
DurgaSoft# cat cluster_deletion.py
# This example script corresponds to the cluster_creation.py script:
# * connects WLST to the Admin Examples Server
# * starts an edit session
# * For each cluster created in cluster_creation.py, it deletes the
# * managed servers and the migratabletargets.
# * Lastly, it deletes the clusters.
print 'starting the script ....'
username = 'weblogic'
password = 'weblogic'
clusters = 'cluster1','cluster2'
ms1 = {'managed1':7701,'managed2':7702,'managed3':7703, 'managed4':7704,
'managed5':7705}
ms2 = {'managed6':7706,'managed7':7707,'managed8':7708, 'managed9':7709,
12. Weblogic- WLST-SCRIPTING
'managed10':7710}
connect(username,password,'t3://localhost:7001')
edit()
startEdit()
s = " (migratable)"
for m, lp in ms1.items():
print 'deleting managed server '+m
serverMBean = getMBean("Servers/"+m)
serverMBean.setCluster(None)
managedServer = delete(m,'Server')
for m1, lp1 in ms2.items():
print 'deleting managed server '+m1
serverMBean = getMBean("Servers/"+m1)
serverMBean.setCluster(None)
managedServer = delete(m1,'Server')
for c in clusters:
print 'deleting cluster '+c
clu = delete(c,'Cluster')
13. Weblogic- WLST-SCRIPTING
save()
activate(block="true")
print 'Saved Changes ...'
print 'End of script ...'
disconnect()
5) Script to create JMS Resources ( configJMSSystemResource.py )
How to Invoke the script :
# java weblogic.WLST –skipWLSModuleScanning configJMSSystemResource.py
DurgaSoft# cat configJMSSystemResource.py
"""
This script starts an edit session, creates two different JMS Servers,
targets the jms servers to the server WLST is connected to and creates
jms topics, jms queues and jms templates in a JMS System module. The
jms queues and topics are targeted using sub-deployments.
"""
import sys
from java.lang import System
print "Starting the script ..."
16. Weblogic- WLST-SCRIPTING
print "Creating MyJMSTemplate..."
jmstemplate = theJMSResource.createTemplate('MyJMSTemplate')
jmstemplate.setMaximumMessageSize(20)
try:
save()
activate(block="true")
print "script returns SUCCESS"
except:
print "Error while trying to save and/or activate!!!"
dumpStack()
6) Deleting the JMS Resources (deleteJMSSystemResource.py)
How to Invoke the Script:
#java weblogic.WLST –skipWLSModuleScanning deleteJMSSystemResource.py
DurgaSoft# cat deleteJMSSystemResource.py
# This example script connects WLST to the Admin Examples Server
# * starts an edit session
# * removes a JMS system resource module.
import sys
from java.lang import System
17. Weblogic- WLST-SCRIPTING
print 'starting the script ....'
connect('weblogic','weblogic','t3://localhost:7001')
edit()
startEdit()
jmsMySystemResource = delete("myJmsSystemResource","JMSSystemResource")
jmsMyServer1 = delete("MyJMSServer1","JMSServer")
jmsMyServer2 = delete("MyJMSServer2","JMSServer")
save()
activate(block="true")
print 'System Resource removed ...'
disconnect()
7) Script to create JDBC resources (jdbc_data_source_creation.py)
How to Invoke :
# java weblogic.WLST –skipWLSModuleScanning jdbc_data_source_creation.py
DurgaSoft# cat jdbc_data_source_creation.py
"""
This script configures a JDBC data source as a System Module and deploys it
to the server
"""
connect("weblogic","weblogic")
edit()
19. Weblogic- WLST-SCRIPTING
oracle-sid")
# driverParams.setDriverName("oracle.jdbc.driver.OracleDriver")
driverParams.setPassword("examples")
# driverParams.setLoginDelaySeconds(60)
driverProperties = driverParams.getProperties()
proper = driverProperties.createProperty("user")
#proper.setName("user")
proper.setValue("examples")
proper1 = driverProperties.createProperty("DatabaseName")
#proper1.setName("DatabaseName")
proper1.setValue("jdbc:pointbase:server://localhost/demo")
jdbcSR.addTarget(target)
save()
activate(block="true")
print 'Done configuring the data source'
8) deletion of datasources (jdbc_data_source_deletion.py)
How to Invoke It:
# java weblogic.WLST –skipWLSModuleScanning
jdbc_data_source_deletion.py
20. Weblogic- WLST-SCRIPTING
DurgaSoft# cat jdbc_data_source_deletion.py
print 'starting the script ....'
username = 'weblogic'
password = 'weblogic'
connect(username,password,'t3://localhost:7001')
edit()
startEdit()
delete('myJDBCDataSource','JDBCSystemResource')
save()
activate(block="true")
Finding MBeans and Attributes
To locate a particular MBean and attribute, you use the find command. WLST returns
the pathname to the MBean that stores the attribute and its value. You can use the
getMBean command to return the MBean specified by the path. For more information,
see find and getMBean.
For example:
wls:/mydomain/edit !> find('logfilename')
searching ...
/ApplicationRuntimes/myserver_wlnav.war/WebAppComponentRuntime/myserver
_myserver_wlnav.war_wlnav_/wlnavLogFilename null
/Servers/myserver JDBCLogFileName jdbc.log
/Servers/myserver/WebServer/myserver LogFileName access.log
wls:/mydomain/edit !>
bean=getMBean('Servers/myserver/WebServer/myserver')
wls:/mydomain/edit !> print bean
[MBeanServerInvocationHandler]mydomain:Name=myserver,Type=WebServer,Ser
ver=myserver
wls:/mydomain/edit !>
21. Weblogic- WLST-SCRIPTING
Note: getMBean does not throw an exception when an instance is not found.
Alternatively, the getPath command returns the MBean path for a specified MBean
instance or ObjectName for the MBean in the current MBean hierarchy. See getPath.
wls:/mydomain/serverConfig>path=getPath('com.bea:Name=myserver,Type=Ser
ver')
wls:/mydomain/serverConfig> print path
Servers/myserver