reklama - zainteresowany?

Head First EJB. Passing the Sun Certified Business Component Developer Exam - Helion

Head First EJB. Passing the Sun Certified Business Component Developer Exam
ebook
Autor: Kathy Sierra, Bert Bates
ISBN: 978-14-493-7008-4
stron: 734, Format: ebook
Data wydania: 2003-10-28
Księgarnia: Helion

Cena książki: 126,65 zł (poprzednio: 147,27 zł)
Oszczędzasz: 14% (-20,62 zł)

Dodaj do koszyka Head First EJB. Passing the Sun Certified Business Component Developer Exam

What do Ford Financial, IBM, and Victoria's Secret have in common? Enterprise JavaBeans (EJB). As the industry standard for platform-independent reusable business components, EJB has just become Sun Microsystem's latest developer certification. Whether you want to be certifiable or just want to learn the technology inside and out, Head First EJB will get you there in the least painful way. And with the greatest understanding.You'll learn not just what the technology is, but more importantly, why it is, and what it is and isn't good for. You'll learn tricks and tips for EJB development, along with tricks and tips for passing this latest, very challenging Sun Certified Business Component Developer (SCBCD) exam. You'll learn how to think like a server. You'll learn how to think like a bean. And because this is a Head First book, you'll learn how to think about thinking.Co-author Kathy Sierra was one of Sun's first employees to teach brave, early adopter customers how to use EJB. She has the scars. But besides dragging you deep into EJB technology, Kathy and Bert will see you through your certification exam, if you decide to go for it. And nobody knows the certification like they do - they're co-developers of Sun's actual exam!As the second book in the Head First series, Head First EJB follows up the number one best-selling Java book in the US, Head First Java. Find out why reviewers are calling it a revolution in learning tough technical topics, and why Sun Chairman and CEO Scott McNealy says, "Java technology is everywhere...if you develop software and haven't learned Java, it's definitely time to dive in "Head First."And with Head First book, you don't even have to feel guilty about having fun while you're learning; it's all part of the learning theory. If the latest research in cognitive science, education, and neurobiology suggested that boring, dry, and excruciatingly painful was the best way to learn, we'd have done it. Thankfully, it's been shown that your brain has a sense of style, a sense of humour, and a darn good sense of what it likes and dislikes.In Head First EJB, you'll learn all about:

  • Component-based and role-based development
  • The architecture of EJB, distributed programming with RMI
  • Developing and Deploying an EJB application
  • The Client View of a Session and Entity bean
  • The Session Bean Lifecycle and Component Contract
  • The Entity bean Lifecycle and Component Contract
  • Container-managed Persistence (CMP)
  • Container-managed Relationships (CMR)
  • EJB-QL
  • Transactions
  • Security
  • EJB Exceptions
  • The Deployment Descriptor
  • The Enterprise Bean Environment in JNDI
  • Programming Restrictions and Portability
The book includes over 200 mock exam questions that match the tone, style, difficulty, and topics on the real SCBCD exam. See why Kathy and Bert are responsible for thousands of successful exam-passers--"The Sun certification exam was certainly no walk in the park, but Kathy's material allowed me to not only pass the exam, but Ace it!"--Mary Whetsel, Sr. Technology Specialist, Application Strategy and Integration, The St. Paul Companies"Kathy Sierra and Bert Bates are two of the few people in the world who can make complicated things seem damn simple, and as if that isn't enough, they can make boring things seem interesting."--Paul Wheaton, The Trail Boss, javaranch.com"Who better to write a Java study guide than Kathy Sierra, reigning queen of Java instruction? Kathy Sierra has done it again. Here is a study guide that almost guarantees you a certification!"--James Cubetta, Systems Engineer, SGI

Dodaj do koszyka Head First EJB. Passing the Sun Certified Business Component Developer Exam

 

Osoby które kupowały "Head First EJB. Passing the Sun Certified Business Component Developer Exam", wybierały także:

  • Windows Media Center. Domowe centrum rozrywki
  • Ruby on Rails. Ćwiczenia
  • DevOps w praktyce. Kurs video. Jenkins, Ansible, Terraform i Docker
  • Przywództwo w Å›wiecie VUCA. Jak być skutecznym liderem w niepewnym Å›rodowisku
  • Scrum. O zwinnym zarzÄ…dzaniu projektami. Wydanie II rozszerzone

Dodaj do koszyka Head First EJB. Passing the Sun Certified Business Component Developer Exam

Spis treści

Head First EJB. Passing the Sun Certified Business Component Developer Exam eBook -- spis treści

  • Head First EJB
  • Dedication
  • A Note Regarding Supplemental Files
  • Advance praise for Head First EJB
  • Praise for the Head First approach and Head First Java
  • Praise for the Head First approach
  • Perpetrators of the Head First series (and this book)
  • How to Use This Book: Intro
    • Who is this book for?
      • Who should probably back away from this book?
    • We know what youre thinking
    • And we know what your brain is thinking
    • Metacognition: thinking about thinking
    • Heres what WE did
    • Heres what YOU can do to bend your brain into submission
    • What you need for this book
    • Last-minute things you need to know
    • About the SCBCD exam
    • Technical Reviewers
    • Other people to credit:
  • 1. Intro to EJB: Welcome to EJB
    • What is EJB all about?
    • What does EJB really give me?
    • No more vendor lock-in!
    • How does it all work?
    • Behind the scenes...
    • Beans come in three flavors
    • Session beans can be stateless or stateful
    • Example: The Advice Guy bean
    • Five things you do to build a bean:
    • EJB Roles and Responsibilities
    • Tutorial:
    • Organize your project directory
      • Organizing your terminal / command-line
    • Compile the two interfaces and the bean class
    • Start the server
    • Youll see something like this
    • Start deploytool
    • youll see something like this
    • Make a new Application
    • Name and save the new application
    • What youll see after you create and name the application
    • Now lets make the new enterprise bean (the ejb-jar and the DD)
    • Now were in the really cool New Enterprise Bean Wizard
    • Create the new ejb-jar
    • Add the three class files (including their package directory) to the JAR
    • Confirm that you added ONLY the package directory and the class files
    • Make it a Stateless Session bean
    • Tell it which of the three class files in the JAR is the actual BEAN class
    • Tell it which is the Home interface, and which is the Component interface
    • Verify everything on this screen!
    • Youre done, click Finish
    • Meanwhile back on the main deploytool screen...
    • Run your bean through the deploytool verifier
    • Close your eyes and click OK
    • Whew! No failed tests
    • Time to Deploy
    • Make it Return a Client Jar
    • Give it a name, so clients can look it Up
    • Watch the progress bars go up, then celebrate
    • Now youll see the AdviceApp inside the server
    • Now all we need is a client...
    • Organizing your project directory for the client
      • Run the client!
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 2. Architectural Overview: EJB Architecture
    • You remember this picture...
    • Making a remote method call
    • Theres a helper on the server as well...
    • What about arguments and return values?
    • What really gets passed when you pass an object to a remote method?
    • Passing a Remote object through a remote method call
    • What must the Remote object and the stub have in common?
    • The client calls business methods on the stub through the Remote business interface
    • How EJB uses RMI
    • The Remote object is not the bean, its the beans bodyguardthe EJBObject
    • The Component interface
    • Who writes the class that really DOES implement the component interface? In other words, who makes the EJBObject class?
    • Who creates what?
    • The bean Home
    • Architectural overview: Session beans
    • Architectural overview: Entity beans
    • Architectural overview: Creating a Stateful Session bean
    • Architectural overview: Creating a Stateless Session bean
    • Who creates the stateless session bean, and when?
    • Stateless session beans are more scalable
    • Architectural overview: Message-driven beans
  • 3. The Client View: Exposing Yourself
    • What the client really wants
    • It all starts with the home interface
    • How a client uses a session bean: create, use, and remove
    • But first, we have to get a home interface reference
      • In other words, we have to get the stub to the home object... the thing we use to call create(), so that we can get what we really wantthe EJB object stub!
      • Whats JNDI?
    • Lets take another look at the complete client code
    • Just when you thought a simple cast would be enough...
    • But NO. You have to narrow the object as well!
    • OK, Ill bite. Why cant you just do a plain old cast?
    • PortableRemoteObject.narrow()
    • Writing the Remote home interface for a session bean
    • Remote home interface examples for session beans
    • But enough about the home... lets talk about the EJB object. The component interface. The thing you REALLY want.
    • Imagine what else you might want to do with your EJB object reference...
      • Online shopping should not be rushed...
    • Thankfully, weve got handles
    • isIdentical?
      • how to find out if two stubs refer to the same bean
    • A beans client interfaces can be local
    • Which methods make sense for the local client interfaces?
      • Do we need handles with local interfaces?
      • Do we need EJBMetaData with local interfaces?
      • Do we need isIdentical() with local interfaces?
      • Do we need primary key information with local interfaces?
      • Do we need remove methods with local interfaces?
    • When you think handle, think Remote
      • Local clients dont need handles!
    • Who needs EJBMetaData when youve got reflection?
      • Local clients dont need EJBMetaData!
    • Do you need isIdentical() when theres equals()?
      • Local clients still need isIdentical()
    • Why so many remove methods?
      • For Remote clients, two in the home, plus one in the component interface
      • How can you use a remove that takes a handle when you dont have a handle?
        • Local clients dont have handles, so local homes dont have a remove() that takes a handle.
    • Comparing Remote vs. Local interfaces
    • Writing the local client interfaces
    • You can have both a Remote and local client view for a bean, but you probably wont.
    • Exceptions in client interfaces: what the client might get
    • Local client code
    • What has to change inside the bean class?
    • Arguments to Remote vs. local methods
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 4. Session Bean Lifecycle: Being a Session Bean
    • Exploring the session bean lifecycle
    • You remember how it all works, right?
      • Getting and using a stateful session bean
    • Theres obviously more to the beans lifecycle than just creation and business methods...
    • Container Callbacks, for the special moments in a beans life...
    • Container Callbacks come from TWO places
    • Implementing the container callbacks
    • We have to look at the transitions
    • Bean Creation: when an object becomes a bean
    • Bean things you can do during creation
    • Bean Use: what happens AFTER creation...
    • Bean things you can do within business methods
    • Passivation: a stateful beans chance at scalability...
    • Your job for passivation: make your state passivatable!
    • Bean things you can do in ejbActivate() and ejbPassivate()
    • Bean Removal: when beans die
    • Complaints about bean removal
    • Bean things you can do in ejbRemove()
    • Implementing the AdviceBean as a stateFUL bean
      • Things you can add if the bean is stateFUL
    • AdviceStatefulBean code
    • AdviceStatefulBean CLIENT code
    • Deploying a stateful bean
    • Compared to stateful beans, stateless beans have a simple life
    • Bean things you can do from stateless bean methods
    • Writing a Session Bean: your job as Bean Provider
    • SessionContext
      • You need it more than it needs you
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 5. Entity Bean Intro: Entities are Persistent
    • Whats an entity bean?
    • Entities vs. Entity Beans
    • Entity beans from the clients point of view
    • A very simple Customer entity bean
    • An entity beans client view
    • Entity bean Remote component interface
    • Entity bean Remote component interface
    • Entity bean Remote home interface
      • How its different from a session bean home interface:
    • What does the client really want from an entity bean home?
    • Entity bean Remote home interface
    • When finders have a dark side...
    • Home business methods to the rescue
    • Session bean create() vs. entity bean create()
    • Session bean remove() vs. entity bean remove()
    • Entity/bean/instance death
    • Entity bean client view
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 6. Bean/Entity Synchronization: Being an Entity Bean
    • The real power of entity beans is synchronization
    • The only question is WHO does the work when its time to synchronize
    • Container-managed vs. bean-managed persistence
    • A brief history on the evolution of CMP 2.0
    • The EntityBean interface adds three new container callbacks (including two just for synchronization)
    • Even the methods that are the same, dont behave the same
    • But wait... theres more! Entity beans have new home container callbacks, too
    • Writing a CMP entity bean: make it abstract
    • You put three kinds of things in your bean class:
    • PLUS... (ok, thats four things...)
    • Virtual fields are NOT instance variables!
    • Complete code for the CustomerBeanCMP class
    • So how DID the client get a reference to the EJB object for #28?
    • Bean things you can do during entity construction:
    • Object identity: the primary key
    • Bean things you can do during entity creation:
    • Bean things you can do in home business methods
    • Bean things you can do during activation and loading
    • Bean things you can do during passivation and storing
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 7. Entity Relationships: When Beans Relate
    • Beanifying your movie database
    • But we dont want to think in TABLES We want to think in CLASSES
    • We need relationships between the Movie bean and the Director bean
    • Why should the Director be a bean? Why cant it just be data?
    • Relationships and multiplicity
    • Multiplicity in Bean Classes
    • Multiplicity affects return type!
    • Defining virtual fields for persistent data fields and relationship fields
    • Defining your abstract persistence schema (virtual fields arent enough)
      • The Container needs these TWO things to know you have a CMP field title
    • Persistent CMP fields in the DD
    • Using relationships in your code
    • Defining relationships in your abstract persistence schema (in the DD)
      • Relationship definition for the Director-to-Movie relationship
      • Director-to-Movie relationship
      • Relationships can be one-way (unidirectional)
      • The dark side of a unidirectional (one-way) relationship
      • Cascade delete can propagate
      • Director-to-Movie relationship
      • Movie-to-Trailer relationship
      • The abstract schema is in the <entity> element and the <ejb-relation> is in the <relationships> element
      • MovieBean code with a CMR field
      • The MovieBeans home interface
    • Mapping from abstract schema to a real database
      • Writing your portable queries, for select and finder methods
      • EJB-QL for the MovieBean
      • Using an optional WHERE clause
      • Navigating to another related bean
      • Selecting a value rather than the whole bean
      • EJB-QL SELECT
      • EJB-QL SELECT when to use Object ( )
      • What does it MEAN to return an abstract schema type?
      • SELECT and FROM are mandatory!
      • Identifiers
      • The WHERE clause
      • The WHERE clause
      • The problem with using Collection types
      • Collections dont bark()!
      • The IN operator lets you say For an individual element IN the Collection...
      • The BETWEEN expression
      • The other IN
      • The IS EMPTY comparison expression
      • The IS NOT EMPTY comparison expression
      • The LIKE expression
      • The NOT LIKE expression
      • Relationship assignments
      • If the multiplicity of the relationship field is ONE, its a MOVE If the multiplicity is MANY, its a COPY
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 8. Message-Driven Beans: Getting the Message
    • Imagine this scenario...
    • Too bad these guys arent message-driven beans
      • Dont they look a lot like stateless session beans?
    • Message-driven bean class
    • Writing a message-driven bean: your job as Bean Provider
    • Notice something missing from the code?
      • We never said what kind of messages were listening for, or where they might be coming from.
      • Complete DD for a message-driven bean
    • Topics and Queues
    • Only ONE bean per pool gets a copy of a topic message
    • With a queue, only one bean gets the message. Period.
    • MessageDrivenContext
    • MessageDrivenContext
    • What if something goes wrong?
    • Message acknowledgement
    • Thats all well and good, but lets go back and see how our earlier scenario ended...
    • Think about it.
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 9. EJB Transactions: The Atomic Age
    • The ACID test
      • Is your transaction safe?
    • Distributed transactions: two-phase commit
    • How it works in EJB
      • Transactions can propagate through method calls
    • Some transactions dont propagate
      • The callers transaction might be suspended
    • How do I make (or get) a transaction?
      • Two ways: code it or declare it
    • Transaction-related methods are in two interfaces
    • Making a BMT transaction
    • Call stack of the checkOut() method
    • Things you must NOT do with BMT
    • What does it mean to suspend a transaction?
    • The UserTransaction interface
    • setRollbackOnly()
      • The sound of a transactions death
    • setRollbackOnly() lives in TWO interfaces
    • getRollbackOnly()
      • Because lifes too short for a bean to waste time
    • BMT beans use getStatus() instead of getRollbackOnly()
    • BMT can be a really BAD idea. BMT hurts bean reuse
    • Container-managed transactions
    • How attributes work
      • Know your attributes
    • Transaction attributes that require a transaction
    • Transaction attributes that do not require a transaction
    • These are the methods you MUST mark with an attribute (for a CMT bean)
    • Unspecified Transaction Context
    • Burn these in
    • Marking transactions in the DD
    • DD example for CMT
    • More DD examples for CMT
    • Summary of Bean-managed demarcation
    • Entity beans have ejbLoad() to stay synchronized, even if the transaction rolls back.
    • Session Synchronization
      • because session beans dont have ejbLoad and ejbStore
    • SessionSynchronization special moments
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 10. Exceptions in EJB: When beans go bad
    • What can go wrong?
    • Remember, Java exceptions can be checked or unchecked
    • Its all about expectations...
    • In EJB, exceptions come in two flavors: application and system
    • With an Application Exception, the Container will...
    • With a System Exception, the Container will...
    • Warning! RemoteException is checked, but not expected!
      • A Remote entity bean home interface declares application exceptions and one system exception (RemoteException)
      • A local entity bean home interface declares only application exceptions
    • RemoteException goes to remote clients EJBException goes to local clients
    • Bean Providers responsibilities
    • The Containers responsibilities
    • The five standard EJB application exceptions
    • The five standard application exceptions from the clients point of view
    • Common system exceptions
    • Common system exceptions
    • Scenarios: what do you think happens?
    • Scenario Summary
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 11. Security in EJB: Protect Your Secrets
    • Imagine youre writing a payroll application...
    • What can you do?
    • How to do security in EJB
    • The Application Assemblers job: access control
    • Defining the roles
      • The <security-role> element
    • Defining the roles... a better way
      • The <security-role> element with descriptions
    • Defining the method permissions
      • The <method-permission> element
    • Defining the method permissions
      • Three different ways to specify methods
    • Method permissions interact with one another as a union!
    • Watch out for <unchecked/>
    • The Deployers job: mapping actual humans to abstract roles
    • Principals and Roles, Users and Groups
    • Class-level vs. instance-level security
      • When declarative security is not enough, you might need programmatic security to restrict access to a specific instance of a bean.
    • Using programmatic security to custom-tailor a method
    • The problem with isCallerInRole()...
      • the Bean Provider hard codes a role name, but how does he know what roles the App Assembler will use? And what if theres more than one Bean Provider?
    • Map declarative security roles to the programmers hard-coded (fake) roles
    • Use <run-as> security identity to pretend someone else is calling...
    • Security context propagation with <run-as>
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • 12. A Beans Environment: The Joy of Deployment
    • A beans special place- java:comp/env
    • But its not per bean instance... Its per bean home
    • Its simple... if the programmer puts a made-up JNDI name in code, he has to announce that to the deployer in the DD.
    • Bean Provider and Application Assembler responsibility for the Deployment Descriptor
    • Deployer responsibility for the Deployment Descriptor
    • Remembering who does what
    • Now lets look at the beans runtime environment
    • Which APIs does EJB 2.0 guarantee?
    • What MUST be in an ejb-jar?
    • Structure of an ejb-jar
    • Programming restrictions
    • Coffee Cram: Mock Exam
    • Coffee Cram: Mock Exam Answers
  • A. Final Mock Exam
    • Coffee Cram
    • Coffee Cram: Master Mock Exam
    • Coffee Cram: Master Mock Exam Answers
    • This isnt goodbye
    • Cover Rough Drafts for the series
  • B. Interface summary
  • Index
  • About the Authors
  • Copyright

Dodaj do koszyka Head First EJB. Passing the Sun Certified Business Component Developer Exam

Code, Publish & WebDesing by CATALIST.com.pl



(c) 2005-2024 CATALIST agencja interaktywna, znaki firmowe należą do wydawnictwa Helion S.A.