Java Beans and Enterprise Java BeansChanging PerspectivesComponentsOverviewJava BeansSlide 6Java Beans FundamentalsArchitecture: EventsArchitecture: PropertiesArchitecture: MethodsAbilitiyFive Defining FeaturesSlide 13Differences Between Beans and ClassesIntrospection ToolsBean vs. ClassEvent ModelJava 1.1 Delegation Event ModelExample: Event for Employee’s Hire DateEventListenerSlide 21EventSourceEventSource: MethodsEventSource: Hiring ExampleWhat is Enterprise Java Beans ?Designer and Developer Roles in Enterprise Java Beans (EJB)EJB Roles & DeploymentUtilizing EJB TechnologyThe EJB ArchitectureRecall CORBAEJB ContainerEnterprise Java APIsEnterprise Java Beans Session BeansEnterprise Java Beans Entity BeansModel for Persistence Passivation/ActivationStateless vs. Stateful Session BeansPersistent Session BeansEntity Bean PersistenceWriting an EJB ClientWriting a Session BeanSession Bean ExampleWriting an Entity BeanEntity Bean ExampleDeploying EJBsWho’s Announced EJB Support?Typical Development and Deployment ScenarioEJB Component-Based ArchitectureClient-Server Component ModelClient-Server Component RelationshipClient-Server Component Relationship (Concluded)EJB Server ExampleEJB Server Example (continued)EJB Server Example (Concluded)Three-Tier Architecture ConceptTwo-Tier, Three-Tier, Four-Tier Example ArchitecturesWombat SecuritiesFour-Tier Architecture ExampleInitialization CodeUser Interface CodeBusiness Logic CodeDatabase Access CodeNocturnal Aviation, Inc.Three-Tier ExampleSanta Cruz WidgetsSanta Cruz Widgets (2-tier)Architecture ComparisonsFurther API ComparisonsSummary & Key MessagesEJB RoadmapWhat Is the Java Blend Product?JavaBlend ApplicationsJava Blend ComponentsJava Blend Runtime ArchitectureJava Blend Software and Enterprise JavaBeans TechnologyCSE298 CSE300JR&B-1.1Java Beans andJava Beans andEnterprise Java BeansEnterprise Java BeansPaul C. BarrThe Mitre CorporationEatontown [email protected] Cheron,Prof. Steven A. Demurjian,and Mitch SabaComputer Science & Engr. [email protected]://www.engr.uconn.edu/~steve(860) 486 - 4818CSE298 CSE300JR&B-1.2Changing PerspectivesChanging PerspectivesComputers are Guilty of Creating More Disorder Computers are Guilty of Creating More Disorder then Simplicitythen SimplicityCurrent Software Systems are RelicsCurrent Software Systems are RelicsBuilt Largely By and For Technical Computer UsersNever Intended to Operate in Today’s EnvironmentDesigner’s Need to Break Out of Old MoldDesigner’s Need to Break Out of Old MoldConsider Total Design SpaceDesign Should Help Manage Complexity, Not Add to ItWhat is Available to Assist in Changing Times?What is Available to Assist in Changing Times?CSE298 CSE300JR&B-1.3ComponentsComponentsReusable Software Building BlocksReusable Software Building BlocksPre-Constructed from Encapsulated Application Pre-Constructed from Encapsulated Application CodeCodeEasily Combined with Other ComponentsSeamlessly Merged with Custom CodeRapid Prototyping of Complete ApplicaitonWhat is a Component?What is a Component?GUI Widget (Button, Window, etc.)Combination of Components (Window with Elevator Bars and Pull-Down Menus)Application Service (Account Management Function)CSE298 CSE300JR&B-1.4OverviewOverviewA First Look at Java BeansA First Look at Java BeansWhat are They?How are They Utilized?Enterprise Java BeansEnterprise Java BeansNot Just for Clients Anymore!Capabilities and UsageRelationship to “New” and “Old” TechnologiesComponent-Based Client/Server ModelMulti-Tiered Architecture and EJBMulti-Tiered Architecture and EJBTiered Development for ExtensibilityComparisons of ApproachesJava Blend for Database InteroperabilityJava Blend for Database InteroperabilityCSE298 CSE300JR&B-1.5Java BeansJava BeansExtends "Write Once, Run Anywhere (WORA)Extends "Write Once, Run Anywhere (WORA)TMTM" " to Include "Reuse Everywhere”to Include "Reuse Everywhere”What is a Bean?What is a Bean?Independent Reusable Software Component Visually Manipulated in Builder ToolsCan Be Visible Object: AWT Componentsor Invisible Objects: Queues and Stacksor Composed Objects: Calculator Ops + Keys + DisplayCSE298 CSE300JR&B-1.6Java BeansJava BeansBean vs. ComponentBean vs. ComponentSource Code InaccessibleCustomizable to Suit Application Needs via External PropertiesPowerful Means of ReuseExamplesExamplesGUI Button with Property to Allow Button Name to be SetAccount Management Component that Allows Account Database Location to be SetProperties Can be Very Complex and Offer Properties Can be Very Complex and Offer Significant Power to Application BuildersSignificant Power to Application BuildersCSE298 CSE300JR&B-1.7Java Beans FundamentalsJava Beans FundamentalsSupported within IDEsSupported within IDEsVisual Age, JBuilder, PowerJ, Visual Café Construct JavaBeans Component as Specialized Java Classes with Enhanced CapabilitiesThree-Part ArchitectureThree-Part ArchitectureEventsNotifies Others When Something Has OccurredDelegation-Event Model of AWTPropertiesDefine the Characteristics of the BeanMethods Utilized to Define a PropertyCSE298 CSE300JR&B-1.8Architecture: EventsArchitecture: EventsEventsEventsNotifies Others When Something Has OccurredDelegation-Event Model of AWTEvent ElementsEvent ElementsEventobjectsComponents Sends to ListenerEventlistenersIn Order to Register an Eventlistener With a Component, the Component Must Understand the Event SetEvent SourcesWe’ll Discuss Shortly and Revisit in Detail with Java We’ll Discuss Shortly and Revisit in Detail with Java RMIRMICSE298 CSE300JR&B-1.9Architecture: PropertiesArchitecture: PropertiesExample: AWT TextfieldExample: AWT TextfieldUser Will See Properties for the Caret Position, Current Text, and the Echo Character, etc.Methods Used to Define a PropertyMethods Used to Define a Propertypublic void setPropertyName(PropertyType value);public PropertyType getPropertyName();The Name of the Property is Propertyname The Datatype is PropertytypeOnly One Method Present the Property is Read-Only (Set Missing) Or the Property is Write-only (Get Missing)CSE298 CSE300JR&B-1.10Architecture: MethodsArchitecture: MethodsMethodsMethodsPublicAvailable for Anyone to Call Beaninfo and Getmethoddescriptors
View Full Document