Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Please stop to hardcode concrete class instantiation

Please stop to hardcode concrete class instantiation.

In the code below, I don't see why you assume that SessionBroker should
not be replaced by customer, using derived class, knowing that it is not
really tested and coded well.

Even if you believe some concrete class already have some hooks. You do
not know all your customer needs. You should have as much hooks as
possible. The basic start is to externalize resolution of the classes to
instantiate.

Thanks for your understanding.

    protected SessionBroker buildSessionBrokerConfig(SessionBrokerConfig
sessionBrokerConfig) {
        SessionBroker sessionBroker = new SessionBroker();


Back to the top