Tales from the WebLogic Front Line(What NOT to do with WebLogic)Steve MillidgeC2B2 Consulting Limited
AgendaHealth WarningSetting the SceneCommon Anti-patternsAin’t misbehavingThis could kill
C2B2 ConsultingFastPerformance and ScalabilityReliableHigh Availability and RecoverabilityManageableMonitoring and SupportingSecureSecurity
First Day At Work
It’s All Gone to *#*@!
Meet the Project Manager
PhilosophyDon’t Panic you didn’t #@#@ it up.Suspect Configuration  over CodingSuspect bespoke code over WebLogic codeWebLogic is FASTComputers are Logical and Rational
Common Anti-patterns
Too Many Datasources
Too Many DatasourcesData Source per ComponentAll to the Same DatabaseJNDI Name per ComponentC1C1C1DS1DS1DS1Oracle
Why It’s BadRequires XA for all DatasourcesDevelopers receive strange “XA” exceptionUntick Honour Global TransactionsMakes Exception “go away”Datasources now in autocommitDATA CORRUPTION!!Requires more DB connectionsBIND same Datasource to multiple JNDI locations
Inadvertent TX Coupling
Inadvertent TX CouplingWLS 1WLS 2EJB 1REQUIREDInvokeEJB 2 REQUIREDOracle1Oracle2
Why It’s BADResults in “Strange Exceptions” if not All XAIs the REALLY what you wantXA is very heavyweightAnd not guaranteedXA requires particular database configurationYou have 4 minimum XA resources to coordinateFix using REQUIRES NEW
Clustering is TOO Heavy
WLS ClusterWLS Session ClusteringWLS 1WLS 2WLS 3WLS 412Don’t Use the Session as a CacheUSE A CACHE
Too Much logging
Too Much LoggingToo SynchronizedNew Application 30% SlowerTx TimeoutsHigh CPUMany Threads waiting on Logging MonitorDebug turned on, on one nodeIn Memory BufferEach Thread Logged to in memory queueWriter thread writes messages to fileUnder heavy load memory queues grew unbounded1.5Gb heap in log messages
Ain’tMisbehavin’
Session ShenanigansSerializationSession Attributes must be SerializableSee this one all the timeNo Failover!!!Working as per SpecNo PutYou must Put dirtied objects back in the SessionDon’t Get modify then no PutNo Failover!!!Working as per Spec
Exceptions and TXWhat happens to the TX when you throw an Exception from an EJB method?Application ExceptionCommitSystem ExceptionRollback
Poisoned JMS
Poisoned JMSEats CPUPrevents DeliveryKills Server PerformanceJMSQRepeatForeverSet Redeliver DelaySet Redelivery LimitSet Error DestinationException
Poisoned JMS (Paging)WLS Keeps Messages in MemoryCauses OutOfMemory ExceptionsConfigure Paging Thresholds Configure at JMS Server level
This Can Kill You
Too Much RAM-XMS2G –XMX2G32 bit Can be Too MuchO/S Reserves RAMVM Starts upWhen you need it!HOTSPOT DUMP
Node Manager ConfigurationNot Good Out of the BoxAuto Kill If Failed = TRUEAuto Restart = TRUERestart Delay should be setRestart Max should be setSet Panic Action to System.exit
Disappearing DatasourceStart WebLogic when DB not AvailableDatasource is not createdConnection Creation Retry Frequency Seconds should be non-zero
SummaryProduction Configuration is ComplexCall in the Professionals
Example Bullet SlideBullet 1

Tales From the Web Logic Front Line

Editor's Notes

  • #13 These are things we’ve seen people do a lot which you shouldn’t do.
  • #14 We see many examples of lots and lots of datasources