AOP用途の73%を占めるトランザクション管理*1。これが分かればとりあえずGuiceを使ってみようという人が増えるかもしれないので、ちょっと試してみます。 トランザクション機能は他ライブラリを使う Guiceはトランザクションに関する機能を一切持っていません。ドキュメントを見ると"@Transactional"とか書いてあって紛らわしいのですが、「そういうアノテーションを使えば?」という程度の話です。なので、実際にトランザクション管理を行う場合は、自力で実装するか、他のライブラリの機能を使う事になります。今回はSpringのTransactionInterceptorを使ってみますが、Sesar2でもたぶん同じような事が出来ますし、ちょっとインターセプタを書けばHibernateのトランザクション機能を使う事も出来るはずです。 今回の要件 メソッドに@Transactionalと書くと、
9 tips to improve Python performance Python performance gets a bad rap compared with languages such as Java. Use these tips to identify and fix problems in your Python code to tweak its performance. Idempotent HTTP methods and REST The Hypertext Transport Protocol requires all HTTP verbs to identify as idempotent or not. But what is an idempotent method, and how does idempotence apply to RESTful A
Click Framework が最近お気に入りです。それで、Seasar 党の私ではありますが、Guice のシンプルさも気になっている今日この頃なのです。 ということで、Click Framework の Page クラスに Guice でインジェクションを施したいんだけどどうしたらいんだろう? ということになりました。それで S2Click のソースなどをそぞろ見ていたのですが、ぜんぜん見当違い(というか私のやりたいことと微妙にずれている)でした。 ということで、自分なりに考えてみたやり方。とても簡単です。まず前準備として、guice-1.0.jar に加えて guice-servliet-1.0.jar もデプロイします。次に ClickServlet を継承して Guice によるインジェクションを行うサーブレットを作成します。↓こんな感じです。 package example;
Dynamic Finders :: Find it! Warp it! Wideplay.com. new! DynamicFinders is currently version 1.0 and licensed under an Apache 2.0 license. [ Warp Source Download Troubleshooting Email ] Wideplay's Dynamic Finders Dynamic Finders is a part of warp-persist and the Warp Framework's Hibernate and JPA integration. It is a powerful query abstraction as you will see in a second =) Dynamic
id:iad_otomamayさんがGuiceのユーザーガイドを翻訳(すげーはえー!)してくれてたので、 一覧にしてみた。ありがとうございます、あとでじっくり読ませてもらいます>id:iad_otomamayさん Guice User's Guide ■Java on Guice ■1. Introduction ■2. Plain Old Factories ■3. Dependency Injection By Hand 続きを読む JavaExpressの後継として、新たにJavaExpertが創刊されます。 このJavaExpertの特集2として、id:yone098さん、id:manholeさんと 一緒にTeedaの入門記事を書かせていただきました。 TeedaCoreから始まり、Extension、Ajaxと全部をまとめて紹介するのはこれが初めてじゃないでしょうか。 もちろんS
Put simply, Guice alleviates the need for factories and the use of new in your Java code. Think of Guice's @Inject as the new new. You will still need to write factories in some cases, but your code will not depend directly on them. Your code will be easier to change, unit test and reuse in other contexts. Guice embraces Java's type safe nature. You might think of Guice as filling in missing featu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く