Tales From the Web Logic Front Line


Published on

Presentation by Steve Millidge

Published in: Technology
1 Comment
  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • These are things we’ve seen people do a lot which you shouldn’t do.
  • We see many examples of lots and lots of datasources
  • Tales From the Web Logic Front Line

    1. 1. Tales from the WebLogic Front Line(What NOT to do with WebLogic)<br />Steve Millidge<br />C2B2 Consulting Limited<br />
    2. 2. Agenda<br />Health Warning<br />Setting the Scene<br />Common Anti-patterns<br />Ain’t misbehaving<br />This could kill<br />
    3. 3. C2B2 Consulting<br />Fast<br />Performance and Scalability<br />Reliable<br />High Availability and Recoverability<br />Manageable<br />Monitoring and Supporting<br />Secure<br />Security<br />
    4. 4. First Day At Work<br />
    5. 5. It’s All Gone to *#*@!<br />
    6. 6.
    7. 7.
    8. 8. Meet the Project Manager<br />
    9. 9.
    10. 10.
    11. 11. Philosophy<br />Don’t Panic you didn’t #@#@ it up.<br />Suspect Configuration over Coding<br />Suspect bespoke code over WebLogic code<br />WebLogic is FAST<br />Computers are Logical and Rational<br />
    12. 12. Common Anti-patterns<br />
    13. 13. Too Many Datasources<br />
    14. 14. Too Many Datasources<br />Data Source per Component<br />All to the Same Database<br />JNDI Name per Component<br />C1<br />C1<br />C1<br />DS1<br />DS1<br />DS1<br />Oracle<br />
    15. 15. Why It’s Bad<br />Requires XA for all Datasources<br />Developers receive strange “XA” exception<br />Untick Honour Global Transactions<br />Makes Exception “go away”<br />Datasources now in autocommit<br />DATA CORRUPTION!!<br />Requires more DB connections<br />BIND same Datasource to multiple JNDI locations<br />
    16. 16. Inadvertent TX Coupling<br />
    17. 17. Inadvertent TX Coupling<br />WLS 1<br />WLS 2<br />EJB 1<br />REQUIRED<br />Invoke<br />EJB 2 REQUIRED<br />Oracle<br />1<br />Oracle<br />2<br />
    18. 18. Why It’s BAD<br />Results in “Strange Exceptions” if not All XA<br />Is the REALLY what you want<br />XA is very heavyweight<br />And not guaranteed<br />XA requires particular database configuration<br />You have 4 minimum XA resources to coordinate<br />Fix using REQUIRES NEW<br />
    19. 19. Clustering is TOO Heavy<br />
    20. 20. WLS Cluster<br />WLS Session Clustering<br />WLS 1<br />WLS 2<br />WLS 3<br />WLS 4<br />1<br />2<br />Don’t Use the Session as a Cache<br />USE A CACHE<br />
    21. 21. Too Much logging<br />
    22. 22. Too Much Logging<br />Too Synchronized<br />New Application 30% Slower<br />Tx Timeouts<br />High CPU<br />Many Threads waiting on Logging Monitor<br />Debug turned on, on one node<br />In Memory Buffer<br />Each Thread Logged to in memory queue<br />Writer thread writes messages to file<br />Under heavy load memory queues grew unbounded<br />1.5Gb heap in log messages<br />
    23. 23. Ain’tMisbehavin’<br />
    24. 24. Session Shenanigans<br />Serialization<br />Session Attributes must be Serializable<br />See this one all the time<br />No Failover!!!<br />Working as per Spec<br />No Put<br />You must Put dirtied objects back in the Session<br />Don’t Get modify then no Put<br />No Failover!!!<br />Working as per Spec<br />
    25. 25. Exceptions and TX<br />What happens to the TX when you throw an Exception from an EJB method?<br />Application ExceptionCommit<br />System ExceptionRollback<br />
    26. 26. Poisoned JMS<br />
    27. 27. Poisoned JMS<br />Eats CPU<br />Prevents Delivery<br />Kills Server Performance<br />JMS<br />Q<br />RepeatForever<br />Set Redeliver Delay<br />Set Redelivery Limit<br />Set Error Destination<br />Exception<br />
    28. 28. Poisoned JMS (Paging)<br />WLS Keeps Messages in Memory<br />Causes OutOfMemory Exceptions<br />Configure Paging Thresholds <br />Configure at JMS Server level<br />
    29. 29. This Can Kill You<br />
    30. 30. Too Much RAM<br />-XMS2G –XMX2G<br />32 bit Can be Too Much<br />O/S Reserves RAM<br />VM Starts up<br />When you need it!<br />HOTSPOT DUMP<br />
    31. 31. Node Manager Configuration<br />Not Good Out of the Box<br />Auto Kill If Failed = TRUE<br />Auto Restart = TRUE<br />Restart Delay should be set<br />Restart Max should be set<br />Set Panic Action to System.exit<br />
    32. 32. Disappearing Datasource<br />Start WebLogic when DB not Available<br />Datasource is not created<br />Connection Creation Retry Frequency Seconds should be non-zero<br />
    33. 33. Summary<br />Production Configuration is Complex<br />Call in the Professionals<br />
    34. 34. Example Bullet Slide<br />Bullet 1<br />