OSGI Service development | Community
Skip to main content
Jai1122
New Participant
October 16, 2015
Solved

OSGI Service development

  • October 16, 2015
  • 2 replies
  • 947 views

Hi Guys,

    I am trying to create a OSGI bundle in CRXDE  Lite. I have created a sling servlet in that bundle and it is working fine.

Now i want to create a OSGI Service and use it in the servlet. Can i create the Inteface and implementation class as siblings to sling servlet? If not Should i create a separate bundle for this?

The folder structure i follow is shown below (apologies for the format).

 

                                                                                                                           
apps        
 /project       
  /MyBundle     
   /MyBundle.bnd    
   src     
    main    
     java   
      com  
       test 
        Activator.java
        MySlingServlet.java
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Using CRXDE lite to create OSGi is not the recommended way. Now it's recommended that you use Maven and Adobe Archetype to build an OSGi bundle. See these communtiy articles. 

1 . Creating your first AEM Service using an Adobe Maven Archetype project (teaches you how to build an OSGi with Maven)

2. Submitting Adobe CQ form data to custom Sling Servlets (teaches you how to work with Servlets)

Also - see the AEM COmmuity support page for many more How Tos with AEM: https://helpx.adobe.com/marketing-cloud/experience-manager.html

2 replies

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

Using CRXDE lite to create OSGi is not the recommended way. Now it's recommended that you use Maven and Adobe Archetype to build an OSGi bundle. See these communtiy articles. 

1 . Creating your first AEM Service using an Adobe Maven Archetype project (teaches you how to build an OSGi with Maven)

2. Submitting Adobe CQ form data to custom Sling Servlets (teaches you how to work with Servlets)

Also - see the AEM COmmuity support page for many more How Tos with AEM: https://helpx.adobe.com/marketing-cloud/experience-manager.html

Ratna_Kumar
New Participant
October 16, 2015

Hi,

As Scott stated, it is recommended that to build the OSGI bundle through Maven from Adobe Archetype project.

See the AEM support page as given by scott: https://helpx.adobe.com/marketing-cloud/experience-manager.html , as there are so many community articles based on Adobe Archetype to build OSGI bundle.

Thanks,
Ratna Kumar.