Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

OSGI Service development

Avatar

Avatar
Validate 25
Level 3
Jai1122
Level 3

Likes

21 likes

Total Posts

127 posts

Correct Reply

2 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
Jai1122
Level 3

Likes

21 likes

Total Posts

127 posts

Correct Reply

2 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
Jai1122
Level 3

15-10-2015

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

15-10-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

Answers (1)

Answers (1)

Avatar

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ratna_Kumar
MVP

15-10-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.