Building an Open Source ESB and Ruby on Rails
http://raibledesigns.com/page/rd?anchor=djug_building_an_open_source
Development Lessons Learned
Configuring EJBs and MDBs as singletons helped solve some problems (a JBoss setting allows you to configure this). As for running Spring in a heavily-managed environment, they found that setting singleton="false" solved a lot of problems. The next problem they had was mixing Hibernate and JTA Transactions. No details, just that they had an interesting time and it took them a few days to get it working. The last problem they encountered was using Hibernate and/or Spring JDBC to manage hundreds of thousands of records. Since these O/R tools create objects for each record, OOM errors occurred with large resultsets.
現場でのバッドノウハウが公開されると嬉しいなぁと思ったけれど、何だか変な話が書いてある気がするなぁ。
「EJBとMDBをシングルトンとして設定」って、インスタンスが1つってことなんだろうか. それってパフォーマンスは大丈夫なんだろうか。
Springの設定をsingleton=falseにして多くの問題が解決できたって、どういう問題があったのかなぁ。スレッドセーフになってない部分が多くあったのが回避できたって話なのか、もっと複雑な問題なのか。singleton=falseにしたことで、毎回オブジェクト生成することのインパクトはなかったんだろうか。