Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Aren there some issues with only having one application-level classloader, like static fields?

0
Posted

Aren there some issues with only having one application-level classloader, like static fields?

0

Static fields, and static initialisers can cause some issues, and should be used very carefully. Of particular note is transfer of agent data from one system to another – static data is not serializable as it is technically part of the class, rather than the instance to be transferred, thus using static fields in anything other than LocalAgents is not recommended.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.