Use Case: Connect to external datasource using CQ
Solution:
1) My SQL
Step 1: Create OSGI version of mysql Jar file
If you are having trouble creating osgi version of mysql jar file, You can download it from here
2) Teradata
You can also download OSGI version of teradata jar file from here
Note: If You want to call instance of your Connection from Java class (Not from service) You can do something like this,
Solution:
1) My SQL
Step 1: Create OSGI version of mysql Jar file
- Download MySQL JDBC Driver From http://dev.mysql.com/downloads/connector/j
- Open eclipse and select file -> New -> Other -> Plugin development -> Plug-in from existing Jar Archive
- Click next and then select add external. Select jar file you downloaded above and select next
- Give Project Name -> Select Location -> Make sure that Analyze Library Content is checked -> In Target Platform select an OSGI framework -> from drop down select standard -> Check unzip jar file and update reference -> click finish
- An Plugin Development prospective will open
- Click on export tab and make sure that all dependencies are exported (If they are not there, Click on add then select all)
- Click on Dependencies and make sure that Imported packages are there. If it is not there click on MENIFEST.MF tab and then add following import statement
- Once all import and export statement is added your MENIFEST.MF will have following data
- Then right click on your project and then select export
- Select Deployable Deployable plug-in and fragments
- Click Next and select your plug-in
- From Directory section select location where you want to upload.
- Click finish. This will store OSGI jar in to location you selected.
- Once you have MySQL Osgi bundle. Install that bundle either using felix console or adding it through deployment process
- If you are getting error saying javax.Naming not getting resolved then you have to add following line in sling.properties under crx-quickstart folder
- Once bundle is up is running, You need to go to felix osgi config. Search For JDBC connection pool and then click '+'
- Fill all the information about your datasource
- Go to your application logic and test your code
If you are having trouble creating osgi version of mysql jar file, You can download it from here
2) Teradata
- All the steps for Teradata will remain same except you need to create teradata OSGI bundle using Teradata JDBC connector.
- First Download teradatajdbc connector from here https://code.google.com/p/kyunra-java/downloads/detail?name=terajdbc4.jar
- Then Download tdconfig jar from here https://code.google.com/p/kyunra-java/downloads/detail?name=tdgssconfig.jar
- Follow above steps to create osgi version of jar file (Everything will remain same except this time you need to select two jar file for creating osgi version of it)
- Your Final MENIFEST.MF will look like this
- Upload final jar file in CQ, make sure that it is active
- Open OSGI config to create config for teradata connection pool
- You can then test it using same code (Just use teradata data source)
You can also download OSGI version of teradata jar file from here
Note: If You want to call instance of your Connection from Java class (Not from service) You can do something like this,
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
DeleteGreat information you have been shared and it will be useful to everyone.
ReplyDeleteSpoken English Classes in Chennai
Best Spoken English Classes in Chennai
German Language Classes in Chennai
Japanese Classes in Chennai
spanish language in chennai
IELTS Coaching centre in Chennai
Spoken English Classes in Porur
Spoken English Classes in Adyar
Great Article. Thank you for sharing! Really an awesome post for every one.
DeleteDiscerning Feature Supported Encoder for Image Representation Project For CSE
Dual Stream Interactive Networks for No Reference Stereoscopic Image Quality Assessment Project For CSE
Efficient Multiple Organ Localization in CT Image using 3D Region Proposal Network Project For CSE
Enhanced Non Local Total Variation Model and Multi Directional Feature Prediction Prior for Single Image Super Resolution Project For CSE
External Patch Based Image Restoration Using Importance Sampling Project For CSE
Foreground Fisher Vector Encoding Class Relevant Foreground to Improve Image Classification Project For CSE
Fundamental Visual Concept Learning from Correlated Images and Text Project For CSE
Generative Adversarial Networks and Perceptual Losses for Video Super Resolution Project For CSE
Hybrid LSTM and Encoder Decoder Architecture for Detection of Image Forgeries Project For CSE
Hyperspectral Image Unmixing With End member Bundles and Group Sparsity Inducing Mixed Norms Project For CSE
This is really an awesome post for all the people who wants information about this technology.
ReplyDeleteJapanese Classes in Chennai
Japanese Course in Chennai
Best Spoken English Classes in Chennai
French Language Classes in Chennai
pearson vue exam centers in chennai
German Classes in Chennai
Japanese Classes in Tnagar
Japanese Classes in OMR
This is an awesome blog for the people who are really seeking information for this technology.
ReplyDeleteTOEFL Coaching in Chennai
TOEFL Center in Chennai
Best Spoken English Classes in Chennai
French Language Classes in Chennai
pearson vue exam centers in chennai
German Classes in Chennai
IELTS Coaching in Tnagar
IELTS Coaching in OMR
ReplyDeleteGreat blog! Your explanation style is too good, it is very impressed to me. I want more unique posts and Keeping the good work...
Oracle DBA Training in Chennai
Oracle DBA Course in Chennai
Unix Training in Chennai
Oracle Training in Chennai
Pega Training in Chennai
Primavera Training in Chennai
Excel Training in Chennai
Corporate Training in Chennai
Tableau Training in Chennai
All are saying the same thing repeatedly, but in your blog I had a chance to get some useful and unique information, I love your writing style very much, I would like to suggest your blog in my dude circle, so keep on updates.
ReplyDeleteSoftware Testing Training in Chennai
Software Testing Course in Chennai
RPA Training in Chennai
SEO Training in Chennai
Hadoop Training in Chennai
Digital Marketing Course in Chennai
Software Testing Training in OMR
Thanks for sharing informative article… learning driving from experienced instructors help you to learn driving very fast… Learn Melbourne Driving Lessons from experts at Sprint driving School. International driving license
ReplyDeleteExcellent idea! Kind sharing this blog. I am sure that reading your blog leaves the people with some good learning experience. Great job.
ReplyDeleteIELTS Coaching in Anna Nagar
IELTS Coaching in Chennai Anna Nagar
IELTS Coaching in Adyar
IELTS Coaching in Porur
IELTS Coaching in Mumbai
Best English Speaking Classes in Mumbai
Spoken English Classes in Chennai
IELTS Coaching Centre in Chennai
This is an interesting blog that you have posted,Good job.
ReplyDeleteHtml5 Training in Chennai
DOT NET Training in Chennai
c# training in chennai
dot net classes in chennai
mvc training in chennai
Best DOT NET Training institute in Chennai
QTP Training in Chennai
LoadRunner Training in Chennai
It's remarkable. The way you describe the information is awesome. This will really help me out. Thanks for sharing.
ReplyDeleteR Training in Chennai
R Programming Training in Chennai
Blue Prism Training in Chennai
AWS Training in Chennai
VMware Training in Chennai
Cloud Computing Training in Chennai
Data Science Course in Chennai
R Training in Anna Nagar
R Training in T Nagar
Wow, what an awesome spot to spend hours and hours! It's beautiful and I'm also surprised that you had it all to yourselves!
ReplyDeleteKindly visit us @
Best HIV Treatment in India
Top HIV Hospital in India
HIV AIDS Treatment in Mumbai
HIV Specialist in Bangalore
HIV Positive Treatment in India
Medicine for AIDS in India
Cure best blood cancer treatment in Tamilnadu
HIV/AIDS Complete cure for siddha in Tamilnadu
HIV/AIDS Complete cure test result in Tamilnadu
AIDS cure 100% for siddha in Tamilnadu
The article is very interesting and very understood to be read, may be useful for the people. I wanted to thank you for this great read!! I definitely enjoyed every little bit of it. I have to bookmarked to check out new stuff on your post. Thanks for sharing the information keep updating, looking forward for more posts..
ReplyDeleteKindly visit us @
Madurai Travels | Travels in Madurai
Best Travels in Madurai
Cabs in Madurai | Madurai Cabs
Tours and Travels in Madurai
Nice blog, it's so knowledgeable, informative, and good looking site. I appreciate your hard work. Good job. Thank you for this wonderful sharing with us. Keep Sharing.
ReplyDeleteKindly visit us @
100% Job Placement
Best Colleges for Computer Engineering
Biomedical Engineering Colleges in Coimbatore
Best Biotechnology Colleges in Tamilnadu
Biotechnology Colleges in Coimbatore
Biotechnology Courses in Coimbatore
Best MCA Colleges in Tamilnadu
Best MBA Colleges in Coimbatore
Engineering Courses in Tamilnadu
Engg Colleges in Coimbatore
Excellent Blog. I really want to admire the quality of this post. I like the way of your presentation of ideas, views and valuable content. No doubt you are doing great work. I’ll be waiting for your next post. Thanks .Keep it up! Kindly visit us @Luxury Boxes
ReplyDeletePremium Packaging
Luxury Candles Box
Earphone Packaging Box
Wireless Headphone Box
Innovative Packaging Boxes
Wedding gift box
Leather Bag Packaging Box
Cosmetics Packaging Box
Luxury Chocolate Boxes
Such an amazing blog with new updates. I love to learn more about this topic. Waiting for more like this.
ReplyDeleteMicrosoft Dynamics crm Training in Chennai
Microsoft Dynamics Training in Chennai
Microsoft Dynamics crm Training institutes in Chennai
Salesforce Training in Chennai
AngularJS Training in Chennai
ccna course in Chennai
Microsoft Dynamics crm Training in Velachery
Microsoft Dynamics crm Training in T Nagar
Microsoft Dynamics crm Training in OMR
ReplyDeleteA very inspiring blog your article is so convincing that I never stop myself to say something about it.
Great Article
ReplyDeleteFinal Year Project Domains for CSE
Final Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Wonderful post, This article have helped greatly continue writing ..
ReplyDeleteI´ve been thinking of starting a blog on this subject myself .....
ReplyDeleteThank you for sharing this blog post, it is very informative and helpful for me. building and pest inspections Melbourne.
ReplyDeleteGreat information… Domestic oven detailers are premium over cleaners in Melbourne offering affordable oven & BBQ cleaning by trained professionals.
ReplyDeleteThanks for sharing information. I really appreciate it.
ReplyDeleteA very interesting blog....
ReplyDeleteThanks for sharing...
ReplyDeleteVery good Keep it up.
This is so great. Thanks for sharing....
ReplyDeleteNice blog, it’s so knowledgeable, informative, and good looking site. I appreciate your hard work. Good job. Thank you for this wonderful sharing with us. Keep Sharing.
ReplyDeleteSuch A nice post... thanks For Sharing !!Great information for new guy like Happy New year 2020
ReplyDeleteA very inspiring blog your article is so convincing that I never stop myself to say something about it.
ReplyDeleteSuch A nice post... thanks For Sharing !!Great information for new guy like Hanuman Chalisa Lyrics
ReplyDeleteWonderful post, This article have helped greatly continue writing ..
ReplyDeleteI´ve been thinking of starting a blog on this subject myself .....
ReplyDelete