1 / 10

The SwapBox: a Test Container and a Framework for Hot-swappable JavaBeans

The SwapBox: a Test Container and a Framework for Hot-swappable JavaBeans. Lei Tan Babak Esfandiari Bernard Pagurek Carleton University Ottawa, Ontario, Canada babak@sce.carleton.ca. Hot-swapping Problematics. Granularity Referential Transparency State Transfer Interface Mismatch

felice
Download Presentation

The SwapBox: a Test Container and a Framework for Hot-swappable JavaBeans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The SwapBox: a Test Container and a Framework for Hot-swappable JavaBeans Lei Tan Babak Esfandiari Bernard Pagurek Carleton University Ottawa, Ontario, Canada babak@sce.carleton.ca

  2. Hot-swapping Problematics • Granularity • Referential Transparency • State Transfer • Interface Mismatch • Busy State Problem 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  3. Hot-swapping ProblematicsThe Case for JavaBeans • Granularity • component-level • Referential Transparency • event model provides loose coupling • State Transfer • serialization can (could…) make the beans responsible • Interface Mismatch • some idioms help • Busy State Problem 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  4. The SwapBox • An extension to Sun’s Beanbox • a test container for hot-swapping • a hot-swapping framework 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  5. Adapted Adapters • Queuing/blocking of events • The Adapter Center does the bookkeeping for each wiring: • source bean • target bean • the outgoing event • the target method • a reference to the adapter 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  6. More on State Transfer • The problem with serialization • XML as a replacement? • JXML/COINS/… require a schema • Sun’s promise • For now: direct use of getters/setters 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  7. Interface Mismatch • State variables • Methods currently involved in hook-ups • Currently active method • We let the user/manager decide… • mapping rules saved in an XML file 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  8. Mapping rules: example <?xml version='1.0' encoding='us-ascii'?>  <swap> <swap_type>Default</swap_type> <pre_process> <time>123456</time> </pre_process> <post_process> <swap_method>swapMethod</swap_method> </post_process> <state_policy> <state newName="Dim" oldName="Dimension"></state> <state newName="Width" oldName="Width"></state> </state_policy> <interaction_policy> <change_TargetMethod> <event_source>Start Button</event_source> <event_name>button push</event_name> <old_method> <method_name>start</method_name> </old_method> <new_method> <method_name>newStart</method_name> </new_method> </change_TargetMethod> </interaction_policy> </swap> 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  9. SwapBox Snapshots 6th International Workshop on Component-Oriented Programming, Budapest, Hungary, June 18th 2001

  10. Conclusion • No specific development required for hot-swappability other than Beans specs • Ongoing & future work: • dealing with “busy” beans • XSLT for mapping rules • genericity of the approach: COM, Corba… • real life application • Download: http://www.scs.carleton.ca/~ltan2/swapbox.html

More Related