Deploying WO on WindowsMarkus Stolljunidas GmbH, Stuttgart
• customer requirement• Windows integration• WebObjects 4.x migration / mixed deployment• Why not?Windows deployment, why?
WebObjects on Windows• Setup explained, Demos• Common pitfalls• Tools and techniques for Debugging• URLs for stuff you nee...
Windows prerequisites• Windows Server 2003, 2008 (and 2012), 64/32 Bit• (Windows 7)• Install all updates / service packs• ...
WO prerequisites• Install WebObjects 5.4.3 on a Mac• pack /System/Library/Frameworks/Java* (except JavaVM.fw)• Compile cur...
Windows basic setup• InstallVC 2010 Redistributable Packages (64 Bit / 32 Bit)(Apache & WOStart depend on it)64 Bit / 32 B...
WO basic setup• Choose WO base dir (c:Apple)• ENV-Variable NEXT_ROOT• Create Subfolders• .LibraryFrameworks• .LocalLibrary...
Demo 1, Setup• Windows setup• WO setup
WOStart• modified WebObjects-aware Java.exe• <AppName>.exe replaces <AppName>.cmd / WOBootstrap.jar• parse ContentsWindowsC...
WOStart, advantages• no sub process• process name == App name• classpath loaded as system classpath• able to run as NT Ser...
WO app as NT Service• sc.exe create <ServiceName>displayName= "<DisplayName>"binPath = "<PathToWOStart> <WOParameters>"sta...
WOStart 64 Bit vs. 32 Bit• 2 Binaries: 64 Bit and 32 Bit• WOStart.exe must match the chosen JavaVM architecture!• VC 10 re...
Demo 2,WOStart• WOStart• Install wotaskd and JavaMonitor as NT Service
JavaMonitor / WOTaskDWOTaskDWO App 1WO App 2WO App 2WO Appsstart/stopDiskconfiglifebeatJavaMonitor
JavaMonitor / WOTaskD, multiple hostsWOTaskDWO App 1WO App 2WO App 2WOTaskDWO App 1WO App 2WO App 2JavaMonitorWOTaskDWO Ap...
Demo 3, Setup JavaMonitor• Declare host• Create App & Instance
WebServer / Apache vs. IIS• IIS• integrate remote static content• integrate ASP/.NET content• modify Adaptor• needs patche...
IIS• Refurbished WOAdaptor• IIS 7 / 64 Bit and 32 Bit• Bugfixes (stable like Apache-Adaptor)• Streaming (even with unset Co...
IIS, cont.• WOAdaptor is ISAPI-Extension, NOT ISAPI-Filter• Add Server Role „Web Server (IIS)“• Option „ISAPI-Extensions“•...
IIS / Application patch// patch ERXApplication or your Application by adding:String[] myAdaptorExtensions = new String[]{}...
Demo 4, IIS setup• IIS installation• Adaptor config• WebSite config• 32 Bit mode
Apache 2.4 under Windows• Binaries for httpd and WOAdaptor available• avoid compiling• runs as NT Service• short Demo
Debugging WOStart / WOApps•WOStart debuggingset _JAVA_LAUNCHER_DEBUG=1WOStart.exe ...• WOTaskD/JavaMonitor debuggingConten...
Debugging WOAdaptor• IIS• always runs as background task• Process Explorer: is DLL loaded?• Where is my TMP-Folder?• New R...
Pitfalls• text files & line endings• 32 Bit vs. 64 Bit (Wow64)• ONE user for all WO apps• LocalService or dedicated user• n...
Pitfalls, cont.• est.TCP connections do block socketshttp://support.microsoft.com/kb/929851• storage access / UNC paths• a...
Aftermath• Set WOAdaptor credentials• Set JavaMonitor credentials• Firewall
Windows deployment, URLs• VC 10 Redist., 64 Bithttp://www.microsoft.com/en-us/download/details.aspx?id=13523• VC 10 Redist...
URLs, cont.• WOAdaptor, IIS (DLL & EXE, 32 Bit, 64 Bit)http://wocommunity.org/documents/tools/mod_WebObjects/IIS/• Apache ...
Tools• Process Explorer (Microsoft Sysinternals)• Process Monitor (Microsoft Sysinternals)• Notepad++• wireshark / Packety...
Q&A
Upcoming SlideShare
Loading in...5
×

Deploying WO on Windows

4,760
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
4,760
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Deploying WO on Windows

  1. 1. Deploying WO on WindowsMarkus Stolljunidas GmbH, Stuttgart
  2. 2. • customer requirement• Windows integration• WebObjects 4.x migration / mixed deployment• Why not?Windows deployment, why?
  3. 3. WebObjects on Windows• Setup explained, Demos• Common pitfalls• Tools and techniques for Debugging• URLs for stuff you need• Q&A
  4. 4. Windows prerequisites• Windows Server 2003, 2008 (and 2012), 64/32 Bit• (Windows 7)• Install all updates / service packs• Install Java RE (current 64 Bit)• Turn off Firewall• Install Notepad++
  5. 5. WO prerequisites• Install WebObjects 5.4.3 on a Mac• pack /System/Library/Frameworks/Java* (except JavaVM.fw)• Compile current WONDER• pack WONDER fw, apps, examples
  6. 6. Windows basic setup• InstallVC 2010 Redistributable Packages (64 Bit / 32 Bit)(Apache & WOStart depend on it)64 Bit / 32 Bit• Choose proper hostname
  7. 7. WO basic setup• Choose WO base dir (c:Apple)• ENV-Variable NEXT_ROOT• Create Subfolders• .LibraryFrameworks• .LocalLibraryFrameworks• .LocalLibraryWebObjectsConfiguration• .LocalLibraryWebObjectsJavaApplications
  8. 8. Demo 1, Setup• Windows setup• WO setup
  9. 9. WOStart• modified WebObjects-aware Java.exe• <AppName>.exe replaces <AppName>.cmd / WOBootstrap.jar• parse ContentsWindowsCLSSPATH.TXT• application class• classpath• JVM parameters• find and load jvm.dll
  10. 10. WOStart, advantages• no sub process• process name == App name• classpath loaded as system classpath• able to run as NT Servicewith same cmd line parameters
  11. 11. WO app as NT Service• sc.exe create <ServiceName>displayName= "<DisplayName>"binPath = "<PathToWOStart> <WOParameters>"start= auto• sc.exe failure <ServiceName>reset= 30actions= restart/3000• sc.exe start <ServiceName>
  12. 12. WOStart 64 Bit vs. 32 Bit• 2 Binaries: 64 Bit and 32 Bit• WOStart.exe must match the chosen JavaVM architecture!• VC 10 redist!
  13. 13. Demo 2,WOStart• WOStart• Install wotaskd and JavaMonitor as NT Service
  14. 14. JavaMonitor / WOTaskDWOTaskDWO App 1WO App 2WO App 2WO Appsstart/stopDiskconfiglifebeatJavaMonitor
  15. 15. JavaMonitor / WOTaskD, multiple hostsWOTaskDWO App 1WO App 2WO App 2WOTaskDWO App 1WO App 2WO App 2JavaMonitorWOTaskDWO App 1WO App 2WO App 2
  16. 16. Demo 3, Setup JavaMonitor• Declare host• Create App & Instance
  17. 17. WebServer / Apache vs. IIS• IIS• integrate remote static content• integrate ASP/.NET content• modify Adaptor• needs patched Application class• Apache• need for Apache modules• integrate PHP (secure)
  18. 18. IIS• Refurbished WOAdaptor• IIS 7 / 64 Bit and 32 Bit• Bugfixes (stable like Apache-Adaptor)• Streaming (even with unset Content-Length)• Compile using MingW• WebObjects 4.x compatibility
  19. 19. IIS, cont.• WOAdaptor is ISAPI-Extension, NOT ISAPI-Filter• Add Server Role „Web Server (IIS)“• Option „ISAPI-Extensions“• Register WOAdaptor at „CGI and ISAPI Restrictions“• Enable ISAPI-dll at „Handler Mappings“• Create folders / declare in WebSite• Configure in Registry
  20. 20. IIS / Application patch// patch ERXApplication or your Application by adding:String[] myAdaptorExtensions = new String[]{}@Overridepublic String[] adaptorExtensions() {return myAdaptorExtensions;}
  21. 21. Demo 4, IIS setup• IIS installation• Adaptor config• WebSite config• 32 Bit mode
  22. 22. Apache 2.4 under Windows• Binaries for httpd and WOAdaptor available• avoid compiling• runs as NT Service• short Demo
  23. 23. Debugging WOStart / WOApps•WOStart debuggingset _JAVA_LAUNCHER_DEBUG=1WOStart.exe ...• WOTaskD/JavaMonitor debuggingContentsResourcesProperties:NSDebugLevel=NSLog.DebugLevelDetailedNSDebugGroup= NSLog.DebugGroupDeployment• All Apps: Java Remote DebuggingContentsWindowsCLSSPATH.TXT:# JVMOptions == -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n
  24. 24. Debugging WOAdaptor• IIS• always runs as background task• Process Explorer: is DLL loaded?• Where is my TMP-Folder?• New Reg-KeyLOG_PATH (full path to log file)LOG_FLAG (full path to log flag)• Apache• start manually
  25. 25. Pitfalls• text files & line endings• 32 Bit vs. 64 Bit (Wow64)• ONE user for all WO apps• LocalService or dedicated user• no sudo (RunAs does not help)• Permissions Logs & config files• process / user limits
  26. 26. Pitfalls, cont.• est.TCP connections do block socketshttp://support.microsoft.com/kb/929851• storage access / UNC paths• automatic Windows updates• IIS app pools / worker recycling
  27. 27. Aftermath• Set WOAdaptor credentials• Set JavaMonitor credentials• Firewall
  28. 28. Windows deployment, URLs• VC 10 Redist., 64 Bithttp://www.microsoft.com/en-us/download/details.aspx?id=13523• VC 10 Redist., 32 Bithttp://www.microsoft.com/en-us/download/details.aspx?id=8328• WOStart binarieshttp://wocommunity.org/documents/tools/WOStart.zip• WOStart source${WONDER}/Utilities/WOStart
  29. 29. URLs, cont.• WOAdaptor, IIS (DLL & EXE, 32 Bit, 64 Bit)http://wocommunity.org/documents/tools/mod_WebObjects/IIS/• Apache for Windowshttp://www.apachelounge.com/download/• WOAdaptor, Apache/Windows (32 Bit, 64 Bit)http://wocommunity.org/documents/tools/mod_WebObjects/Apache2.4/windows/• WOAdaptor Source${WONDER}/Utilities/Adaptors
  30. 30. Tools• Process Explorer (Microsoft Sysinternals)• Process Monitor (Microsoft Sysinternals)• Notepad++• wireshark / Packetyzer / Fiddler2• powershell• MingW / MingW64
  31. 31. Q&A
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×