Tải bản đầy đủ - 0 (trang)
Appendix A. Installing Products and Examples from the CDs

Appendix A. Installing Products and Examples from the CDs

Tải bản đầy đủ - 0trang

A.1InstallingtheProductsfromtheCDs

BeforeyoubegininstallingtheproductsfromtheCDs,youshouldmake

surethatyourmachinemeetstheminimumrequirements.Thesetof

productsyouwillinstallwillrequireaminimumofa500Mhz(orgreater)

machinewith512MbofRAMand4GBoffreediskspacerunning

Windows2000orWindowsXP.Theinstallationalsorequiresalive

internetconnectiontodownloadaWSADfixpackfromtheIBMWebsite.

Followthesestepstoinstalltheproductset:

Step1.InstallWSAD.InsertDisc1intoyourCDdrive.TheWSAD

installationprocessshouldautomaticallystart.Ifitdoesnot,run

setup.exefromtherootoftheCD.FromtheWSADInstallscreen,

select"InstallIBMWebSphereStudioApplicationDeveloper"and

followthepromptstoinstallWSAD.Atsomepoint,theinstallation

processwillpromptyoutoinsertDisc2.

Step2.InstallDB2UniversalDatabasePersonalEdition,version

8.1.Re-insertDisc1intoyourCDdrive.PressExittocancelthe

WSADinstallationdialog.UsetheWindowsExplorerorStart>Run

torunthefilesetup.exeinthedirectoryDB2PE821.Followthe

promptstocompletetheinstallationofDB2.

Step3.UpgradetoWSAD5.01.StartWSADbychoosingStart>

IBMWebSphereStudio>ApplicationDeveloper5.0fromthe

WindowsStartMenu.OnceWSADhasloaded,selectHelp>

SoftwareUpdates>NewUpdatesfromtheWSADHelpMenu.

WSADwillautomaticallylocatetheWSAD5.01updates.Installboth

oftheselectedupdates.

Step4.FixAPAR#jr18488.Unfortunately,theversionsofDB2and

WSADthatweshipwiththebookhaveacompatibilityproblemthat

makesitimpossibletoexecutesomeofourexamplesunlessitis

addressed.Thedetailsofthisfix(includingitssymptoms)arefound

at:http://www.ibm.com/support/docview.wss?uid=swg21111633.To



fixtheproblem,exitWSAD.Replacethedb2locale.dllfileinyour

WebSphereStudiotoolsinstallationwiththedb2locale.dllfilefrom

DB2V8.1.2.Todothis,copythefile:



db2_home\bin\db2locale.dll

to

ws_home\wstools\eclipse\plugins\com.ibm.etools.subuilder.win32_5.x.x

Where

db2_homeisthedirectorywhereDB2isinstalled.

ws_homeisthedirectorywhereWSADisinstalled.

_5.x.xistheWebSpheretoolspluginversion,basedonyour

currentinstallconfiguration.

Step5.InstallWAS5.0.InsertDisc3intoyourCDdrive.Usingthe

WindowsExplorer,orStart>RunfromtheWindowsStartMenu,run

thefileInstall.exeinthedirectoryWAS50.Followthepromptsto

installWAS5.0.

Step6.InstalltheWAS5.02Fixpack.Beforestartingtheupgrade,

makesurethatallWebSphereprocesses(includingtheIBMHTTP

Server)havebeenstopped.UsetheWindowsExplorerorStart>

RunfromtheWindowsStartMenutorunthefileupdateWizard.bat

insidetheWAS5Fixpack2directoryonDisc3.Followthepromptsto

upgradeWAStofixpack5.02.



A.2InstallingtheCaseStudyExamples

AnewfeaturecalledProjectInterchangehasbeendevelopedforWSAD

tomakeiteasiertoimportprojectsfromazipfile.Thisfeatureisalso

deliveredonDisc3inthecom.ibm.etools.project.interchange.feature.zip

file.Beforeyoubeginimportingandusingthecasestudyoranyother

example,youmustfirstinstallthisfeatureusingthestepswhichfollow.



MoreInformationfortheProjectInterchangeFeature

MoreinformationregardingtheProjectInterchangefeaturecanbefoundin"ShareandShareAlike:

ProjectInterchangeinEclipseandWebSphereStudioMadeSimple"locatedonIBM'sDeveloper

Domain.Youcanusethefollowinglinkforthisarticle:

http://www.ibm.com/websphere/developer/library/techarticles/0309_bergschacher/bergschacher.html.



A.2.1InstallingtheProjectInterchangeFeature

1. Unzipthecom.ibm.etools.project.interchange.feature.zipfileto

yourWSADinstalldirectory.

StartWSAD.Youshouldbepromptedthatyouhavependingchanges.

ClickYes.Ifapromptdoesnotappear,selectHelp>SoftwareUpdates>

PendingChanges.

ExpandthetreeinthePendingConfigurationChangeswindowthat

appears.SelectthetopleveldatewhichincludestheProjectInterchange

feature(thisshouldbethefirstandonlyentry).

ClickFinish.

SelectYeswhenpromptedtorestartsothechangeswilltakeeffect.

NowthattheProjectInterchangefeatureissuccessfullyinstalled,you

mayproceedtoimportthenecessaryprojectsforanexamplereferenced

withinthebook.Thenextstepsdescribehowtoinstallthecasestudy.



A.2.2InstallingtheCaseStudy



6. SelectFile>Import>ProjectInterchangetolaunchthenew

ProjectInterchangewizard.

Browsetotheexamples.zipfileontheCDfortheFromzipfile.

SelectthewasbookandwasbookServersprojectsfromthelist.

ClicktheSelectReferencedbuttontoautomaticallyselectallrequired

projects.

ClickFinishtohavetheselectedprojectsimportedintoyourcurrent

workspace.

Nowthewasbookcasestudyprojectsareinstalledinyourworkspace

andyouarereadytoproceed.Wheneveryouneedtoinstallanother

example,followthesestepsexceptyouwillselecttherequiredproject(s)

fortheexampleyouwishtouseinStep3.



A.2.3RunningtheCaseStudy

Torunthecasestudy,performthefollowingsteps:

1. SelectthewasbookapplicationfromtheJ2EEHierarchyview

andselecttheGenerateDeployCodecontextmenuactionby

right-clicking.ThiswillgeneratedeploycodeforallEJB

modulescontainedintheapplication.

UsetheprocedurefromtheExportDatabaseTablessectionin

Chapter24toexportthetablesforboththeOIDGeneratorand

TimeSheetGroupEJBmoduleprojects.SincetheTimeSheetGroupwas

generatedwiththeNULLIDschemaname,youdonotwanttoexportthe

tablesusingfullyqualifiednamesandyouwanttouseavaliddatabase

loginID.

OpentheWAS5serverconfigurationeditorbydouble-clickingonthe



WAS5serverintheJ2EEHierarchyviewundertheServersgroup.Flipto

theSecuritytabandeditthewsbookJAASauthenticationaliasentryso

thattheuserIDandpasswordmatchthoseusedinStep2.Besureto

pressControl-Stosavetheserverconfiguration.

AddsampledataintothetablescreatedinStep2.Locatethefile

fillTables.clplocatedontheCD.Thecontentsofthisfileareshownhere:



CONNECTTOSAMPLE;



INSERTINTOADDRESSEJB(CITY,STATE1,STREETADDRESS,ZIPCODE,A

'NC','214MapleLeafWay','27555',199);



INSERTINTOADDRESSEJB(CITY,STATE1,STREETADDRESS,ZIPCODE,A

'NC','277BroadclothStreet','27545',299);



INSERTINTOEMPLOYEEEJB(EMPID,HOMEADDRESS_ADDRESSKEY,NAME,S



OFFICE)VALUES('99',199,'FredJones','NC','Durham','501','



INSERTINTOEMPLOYEEEJB(EMPID,HOMEADDRESS_ADDRESSKEY,NAME,ST



OFFICE)VALUES('49',299,'JamieWoo','NC','Durham','501','D



INSERTINTOPROJECTEJB(NAME,PROJNUMBER)VALUES('ProjectPurpl



INSERTINTOPROJECTEJB(NAME,PROJNUMBER)VALUES('ProjectOzma'



ExecutethisfilebyopeningaDB2commandwindowandtyping



db2-t-ffilltables.clp



atthecommandprompt.

SelecttheTimeAppprojectintheJ2EENavigatorpane,andinvoke

RunonServerfromthecontextmenu.Whentheselectserverdialog

appears,selecttheexistingWAS5server.Youshouldseetheindex.html

filepicturedinChapter31.YoucanthenusetheuserguideinChapter

31asaguidetousingtheapplication.



A.2.4InstallingtheWebServicesExample

ThestepsforinstallingtheWebservicesexamplearesimilartothoseof

thecasestudyexceptyouwillusetheWSUtilityClientJ2EE-EAR

applicationprojectanditsrequiredprojects.TheWebservicesexample

alsorequiresthatyouhaveWebSphereApplicationServer5.0.2

installed.Followingthenextsetofstepswillcorrectthecompileerrors

thatarefoundwiththisexample.

1. SelecttheWindow>Preferencesworkbenchmenuoption.

ExpandJavafromthelistandselectClasspathVariables.

ClicktheNewbutton.

EnterWAS_V502forthenameofthenewclasspathvariableand

browsetotheWebSphere5.0.2installdirectoryforthePath.

ClicktheOKbuttontocreatetheClasspathVariable.

SelectOKonthepropertiespagetoacceptthechanges.

SelectYesattheprompttoperformafullbuildandrecompilethe



projects.



AppendixB.ConstructingJ2EEWeb

ServicesUsingWSAD5.1

Atthetimeofthiswriting,WSAD5.0.1wasthelatestcommercially

availableproductsetofferedbyIBMandisthereforethebasetoolingfor

thisbook.Chapter33walkedyouthroughanexampleofcreatingaWeb

servicefromtheRandomIDGeneratorutilityclassusingacombinationof

commandlinetoolsandWSAD.Thereasonforusingcommandline

tools,ratherthantheWebserviceswizardsprovidedwithWSAD5.0.1,is

thewizardsinWSAD5.0.1aretooledforApacheSOAPanddonot

generateartifactsthatarecompliantwiththeJAX-RPCandJSR-109

runtimeprovidedwithWAS5.0.2.Inotherwords,thetoolandtheruntime

wereoutofsync.

Fortunately,theWebservicessupportincludedwithWSAD5.1istooled

togenerateartifactsforWAS5.0.2thetoolandtheruntimearebackin

sync.ThissectionwillpresentthesameexamplefromChapter33using

thenextreleaseofWSAD,version5.1.Wewillalsousethisopportunity

toexploresomeofthenewfeaturespresentedtotheWebservices

developer.



B.1What'sNew?

ThesupportforWebservicesinWSAD5.1isgreatlyenhancedfrom

priorversions.WSAD'sUTChasbeenupgradedto5.0.2,thelatest

versionofWebSphere,whichincludesaJSR-101(JAX-RPC)-andJSR109-compliantWebservicesengine.Thecommandlinetoolsusedin

Chapter33inconjunctionwithVersion5.0arenowintegrateddirectly

intothetoolandexposedthroughcontextawaremenuoptionsand

wizards.Hereisahigh-leveloverviewofadditionalfeaturesincludedin

WSAD5.1.

WSDLeditorthatpresentsagraphicallayoutandsourceviewsofa

WSDLdocument

First-classdeploymentdescriptoreditors

IntegratedJAX-RPChandlersupport

AutomaticinclusionofWebprojecttoenableHTTPtransportfor

EJBs(samefunctionastheendptenablercommand)

Integratedsupportforsecurity

RulestovalidatethecreationofWebservicescompliantwiththe

WS-Iprofiles

BettersupportforUDDI,includinganexplorerandpublishingoptions

Cheatsheetsfortop-downandbottom-upWebservicecreation

Fullcomplementofhelpdocuments

Thereareafewnotesbeforewegetstarted.RelativetotheWeb



servicestooling,Version5.1representsasignificantincreaseinfunction

andintegration.BecausetheWebSpheretoolingmustbecompliantwith

industryspecifications,thisaffectshowcodecanbegenerated.Theway

developmentorganizationschoosetostructuretheirprojectsfor

separatingtheEJBprojectsintosourceandmodulefoldersmay

sometimesresultinminorinaccuracyinartifactgeneration.Becausethis

appendixisbasedonaprereleaseversionofWSAD5.1,someofthe

screenshotsyouseemaydifferslightlyfromwhatyoumayseeinthe

releasedproduct.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Appendix A. Installing Products and Examples from the CDs

Tải bản đầy đủ ngay(0 tr)

×