Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

One OSGi Config With Different Classes

Avatar

Former Community Member

Hello Experts,

I have a very basic question (programming best practice), please help.

I have three different servlets which uses same configurations like username, password and hostname etc. How can i have one OSGi configuration used by all three servlet class.

 

Regards,

~TD

1 Accepted Solution

Avatar

Correct answer by
Level 3
2 Replies

Avatar

Correct answer by
Level 3

Avatar

Level 2

Create global service which is dedicated to maintaining global properties and then in your service call this global property service to get configured values for username..etc