Why would it be beneficial to use stateless beans and dependancy injection over just a simple pojo with static methods? In other words, are the advantages to an EJB purely because of the underlying container benefits like threading, transactions, etc..?
Why would it be beneficial to use stateless beans and dependancy injection over just
Share
A POJO with a bunch of static methods can’t be easily mocked out for testing code that depends on it whereas a stateless singleton can.