JSR 286を見てみる

何が変わるのかを見てみよう・・・。

関連仕様

関連仕様が以下になるみたいだ。

  • Java 2 Platform, Enterprise Edition, v1.4 (J2EE™)
  • Java Servlet™, v2.4
  • JavaServer Pages™, v2.0 (JSP™)
  • The Java™ Architecture for XML Binding (JAXB) 2.0

国コード

国コードがメンテナンスの方を参照するようになっていた。

http://www.iso.org/iso/en/prods-services/iso3166ma/index.html

PLT.2.5 Compatibility

JSR 168 で作ったものも動くべし、とのこと。

PLT.2.6 Major changes introduced with V 2.0

新機能についてまとめてある。

  • Events – enabling portlet to send and receive events and perform state changes or send further events as result of processing an event.
  • Shared session attributes – allowing portlets to share session attributes beyond the current web application.
  • Shared render parameters – allowing portlets to share render parameters with other portlets.
  • Resource serving – provides ability for a portlet to serve a resource.
  • Portlet filter – allowing on the fly transformations of information 5 ation in both the request to and the response from a portlet.

下の2つは、Jetspeed とかに入れた機能だから、影響があるな・・・。まぁ、今後、ここにはいろいろと追加されるのだろうと思うけど。イベントとかは興味深いな。2番目の共有セッションもwarアプリケーション超えてアクセスできるというと、大きな変更だな。

PLT.2.7 Relationship with Java 2 Platform, Standard and Enterprise Edition

Java5 だってさ。J2EEは1.4と言っている。

PLT.3

event requestやresource requests と言う言葉が登場している。細かいことは後述かな・・・。

PLT.4.3 Portlets and Web Frameworks

ここで、processEvent と serveResource メソッドなる話が出ている。これらが追加されるのか。

PLT.5

EventPortletとResourceServingPortletインターフェースを追加したと言っている。つまり、イベントやリソース処理をしたかったら、これを実装しろと言うことみたいだな。

PLT.5.4 Request Handling

そんで、EventPortletとResourceServingPortletについて書いてある。processActionが終わった後に、イベントを発行するとのこと。そんで、processEventが呼ばれるわけね。

serveResource の呼ばれるタイミングは言及していないみたいだけど、見ていると、render の後と思われる。でも、

A client request trigged by a resource URL translates into a render resource request

とも言っているから、render の中でリソース URL を何かすると、発行される可能性もあるな。

PLT.5.4.1 Action Request

イベントは、ActionResponse の setEventまたはsetEventsで発行すべし、とのこと。

PLT.5.4.2 Event Request

イベントについて書いてある。EventRequestとEventResponseだそうな。EventResponseのsetEventとsetEventsでさらに、新たなイベントを発行できるそうな。

PLT.5.4.4 Resource Request

説明がしてあるけど、これだけを呼んでも、何が出来るのかいまいち、よくわからん。ResourceRequest やResourceResponse があることがわかるくらいかな。

PLT.5.4.5 GenericPortlet

EventPortletを実装しているみたい。

時間切れ、今日はここまで。次は、PLT.7から(現在、いまいち、ResourceServingPortletが謎)・・・

JSR-286 Early Draft 1 available for review

だそうな。何か、表示でパラメータを共有できるような感じで書いてある。細かく見ていかないと、何が変わるかわからんな。

The JSR-286 (Portlet 2.0) Early Draft 1 has been released by the Java Community Process. It can be found at: http://jcp.org/aboutJava/communityprocess/edr/jsr286/. According to that page:

“This first draft does not contain all the functionality that the JSR 286 EG considers for this JSR, but mainly supports the features introduced with Web Service for Remote Portlets (WSRP) V 2.0 defined at OASIS and thus the JSR 286 EG seeks feedback these features. Additional features will be introduced with a second early draft.”

Note that the PDF ‘Without Track Changes’ is broken right now. The other PDF has color highlighting new text in the document.

According to PLT.2.6 of the Early Draft:

The major new features of version 2.0 include:

* Events — enabling portlet to send and receive events and perform state changes or send further events as result of processing an event.

* Shared session attributes — allowing portlets to share session attributes beyond the current web application.

* Shared render parameters — allowing portlets to share render parameters with other portlets.

* Resource serving — provides ability for a portlet to serve a resource.

* Portlet filter — allowing on the fly transformations of information in both the request to and the response from a portlet

The closing date for this early draft review is Sept 1. Please send your comments to jsr-286-comments@jcp.org.