You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jfarcand and I believe that XFactory.getDefault() methods are a bit dirty. A static method having access to non static values is an anti-pattern and requires mutable static data which I consider to be a bad idea. @jfarcand mentioned that this was legacy code that was acceptable in the bad old days of EJB < 3.
I suggest that all of the static XFactory.getDefault() methods are deprecated in favour of non static methods eg. AtmosphereConfig.getXFactory(). The preferred method is to inject the AtmosphereConfig into any services using atmosphere.
To remain backwards compatible, I guess we could store AtmosphereConfig in a static variable and the deprecated getDefault() methods could delegate through to it until they are eventually removed in a future version of atmosphere.
Yes, as I said if we have a static reference to AtmosphereConfig the deprecated static methods can pass through to it (until removed in a future major release of atmosphere).
@jfarcand and I believe that
XFactory.getDefault()
methods are a bit dirty. A static method having access to non static values is an anti-pattern and requires mutable static data which I consider to be a bad idea. @jfarcand mentioned that this was legacy code that was acceptable in the bad old days of EJB < 3.I suggest that all of the static
XFactory.getDefault()
methods are deprecated in favour of non static methods eg.AtmosphereConfig.getXFactory()
. The preferred method is to inject theAtmosphereConfig
into any services using atmosphere.To remain backwards compatible, I guess we could store
AtmosphereConfig
in a static variable and the deprecatedgetDefault()
methods could delegate through to it until they are eventually removed in a future version of atmosphere.This means that the following will be deprecated:
In favour of:
The text was updated successfully, but these errors were encountered: