Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Let's serve your data

1,423 views

Published on

Run your Java servlets once and serve them to more Java servers then only Domino

Published in: Technology
  • Be the first to comment

Let's serve your data

  1. 1. Let’s serve your data Frank van der Linden
  2. 2. About me • Freelance Java and front end developer • Owner of Elstar IT • Try to do some running and mountain biking 2
  3. 3. Roadmap • Theory • Prepare • Set up • Develop • Test • Deploy 3
  4. 4. Theory
  5. 5. What is a servlet • Java program to extends the capabilities of a server • Servlets provide a component-based, platform-independent method for building Web-based applications • Servlets run in web containers, Servlet containers 5
  6. 6. Structure and architecture 6
  7. 7. Lifecycle 7
  8. 8. XAgent - a sort of servlet 8
  9. 9. Servlet in NSF • excellent series of Eric McCormick • https://edm00se.io/servlet-series/ 9
  10. 10. Servlet as OSGi plugin • run server wide • Code can be shared with other processes like DOTS, XPages. • With small changes, it run also on other Java servers, like Tomcat, WildFly(a.k.a. Boss) and Websphere 10
  11. 11. OSGi architecture 11
  12. 12. Prepare
  13. 13. Prepare • Download IDE e.g. Eclipse JEE • Set Target platform • Install PDE Debug plugin • Create com.ibm.notes.java.api project 13 *See Appendix A for steps to prepare your IDE
  14. 14. Develop
  15. 15. goals • Create a Shared code plugin • Create a web app plugin which runs on a Java server • Create a OSGi servlet which run on a Domino server 15 * See Appendix B for setup projects
  16. 16. my goals 16
  17. 17. Shared plugin 17
  18. 18. Domino - Servlet 18
  19. 19. Web app - Servlet 19
  20. 20. show some code
  21. 21. Logging • Build in via java.util.logging.Logger • Log an error to the console…. 21
  22. 22. Logging • ….log to a file, by adding a (File) handler 22
  23. 23. Test
  24. 24. Test 24
  25. 25. Test 25
  26. 26. Test 26
  27. 27. Test • tell http quit • load http 27
  28. 28. Warning • After testing remove the pre.launch.ini from your workspace directory of the Domino server 28
  29. 29. Deploy
  30. 30. Deploy • 2 ways of deployment to Domino • as deployable jar • as an update site. • Add to web server 30
  31. 31. As deployable jar • Export as deployable plugin… • Put the jar in the correct directory on the server • tell http quit —> load http 31
  32. 32. As update site • Create Feature project, add plugin projects • Create Update site project, add Feature project • Add update site to update site database • tell http quit —> load http 32
  33. 33. Deploy to web app 33
  34. 34. let’s deploy it
  35. 35. 35
  36. 36. Thank you 36 https://bitbucket.org/flinden68/lets-serve-your-data
  37. 37. Appendix A
  38. 38. Target platform 38
  39. 39. Target platform 39
  40. 40. Target platform 40
  41. 41. PDE plugin 41
  42. 42. PDE plugin 42
  43. 43. PDE plugin 43
  44. 44. com.ibm.notes.java.api 44
  45. 45. Appendix B
  46. 46. OSGi Plugin set up 46
  47. 47. OSGi Plugin set up (servlet) 47
  48. 48. OSGi Plugin set up (servlet) 48
  49. 49. OSGi Plugin set up (servlet) 49
  50. 50. Web app set up 50

×