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.

Using java to access bluemix object storage v2

9,559 views

Published on

If you need the guidance and sample code of using Java to access Bluemix Object Storage V2, here you are.

Published in: Technology
  • Dating for everyone is here: ♥♥♥ http://bit.ly/36cXjBY ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❤❤❤ http://bit.ly/36cXjBY ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • That was just perfect!! I've been failing for months to get this to work! Thanks so much!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Using java to access bluemix object storage v2

  1. 1. © 2014 IBM Corporation Using Java to access Object Storage v2 in Bluemix Joseph Chang Senior IT Specialist IBM Cloud Group Document number
  2. 2. © 2014 IBM Corporation  https://github.com/whitfiea/bluemix-objectstorage-v2 2 The sample code in this slide is from the following url.
  3. 3. © 2014 IBM Corporation Take me to Bluemix Click Here If you need the guidance and sample code of using Java to access object storage v2 in bluemix, go ahead.
  4. 4. © 2014 IBM Corporation4 https://ibm.biz/BdEzTZ Read/Write files with OpenStack Dashboard You can use openstack dashboard to read/write container/folder/file in object storage v2.
  5. 5. © 2014 IBM Corporation5 Click Here.
  6. 6. © 2014 IBM Corporation6 Click Here.
  7. 7. © 2014 IBM Corporation7 Fill in user name and password. Then click sign in.
  8. 8. © 2014 IBM Corporation8 Click Object Store -> Container
  9. 9. © 2014 IBM Corporation Now you see the containers, folders, files. 9 You can create folder/ upload files with this dashboard
  10. 10. © 2014 IBM Corporation Now let’s create object storage service from catalog. 10 Your service created.
  11. 11. © 2014 IBM Corporation Click the service, you can see the number of containers and objects. 11
  12. 12. © 2014 IBM Corporation Click Show Credentials. 12 Take note for all of these information. We will use these info in our Java code.
  13. 13. © 2014 IBM Corporation Now let’s look at the Java code. You can view it from JazzHub.  https://hub.jazz.net/code/edit/edit.html#/code/file/joseph-OrionContent/joseph %2520%257C%2520jx-object-storage2/ 13
  14. 14. © 2014 IBM Corporation Or you can take a copy to local. 14 git clone https://hub.jazz.net/git/joseph/jx-object- storage2/
  15. 15. © 2014 IBM Corporation Use Eclipse to import the sample code 15
  16. 16. © 2014 IBM Corporation Libraries required by this sample 16
  17. 17. © 2014 IBM Corporation Sample 1 : Java Application in Local 17
  18. 18. © 2014 IBM Corporation Classes required by this sample 18
  19. 19. © 2014 IBM Corporation You can get the information from object storage service credential. Refer to p.12. 19
  20. 20. © 2014 IBM Corporation Connect to Object Storage with SwiftApi 20
  21. 21. © 2014 IBM Corporation Java main program 21
  22. 22. © 2014 IBM Corporation Using ContainerApi and ObjectApi 22
  23. 23. © 2014 IBM Corporation Using ContainerApi and ObjectApi 23
  24. 24. © 2014 IBM Corporation Let’s run it 24
  25. 25. © 2014 IBM Corporation View the log in eclipse console 25
  26. 26. © 2014 IBM Corporation Sample 2 : Java Servlet in Bluemix Liberty 26
  27. 27. © 2014 IBM Corporation Prepare the manifest file 27 Replace the host name, object storage service name with yours.
  28. 28. © 2014 IBM Corporation View the Servlet souce 28 The servlet which running in Bluemix liberty with automatically take the environment variables.
  29. 29. © 2014 IBM Corporation Deploy it with cf push 29
  30. 30. © 2014 IBM Corporation The application is running 30
  31. 31. © 2014 IBM Corporation View the result in Browser 31
  32. 32. © 2014 IBM Corporation Thank you 32 Take me to Bluemix Click Here

×