Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JNDI vs Singleton.

Hi Experts,

Here in our client place except for prod. environment they don't have any clustering. We developed a solution with singleton approach like private constructor and factory method for instantiating the instance.So when it went into production we came to know that there are 4 clusters running and my singleton class has 4 object representations on 4 JVMs which can be accessed with





while accessing with the common external URL we are not sure which component on which server is requested.

Can anyone please let me know how to address this issue?

Will JNDI be helpful in this regard, if yes please help with coding to access the JNDI?

Even though we have 4 JVMs will the JNDI be only one?

Can I put the object in the JNDI and can access the same in the all the 4 clusters?



Former Member
Not what you were looking for? View more on this topic or Ask a question