• Share
  • Email
  • Embed
  • Like
  • Private Content
JavaOne Report for Java EE
 

JavaOne Report for Java EE

on

  • 5,267 views

 

Statistics

Views

Total Views
5,267
Views on SlideShare
2,051
Embed Views
3,216

Actions

Likes
4
Downloads
61
Comments
0

3 Embeds 3,216

http://yoshio3.com 3201
https://twitter.com 10
http://webcache.googleusercontent.com 5

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    JavaOne Report for Java EE JavaOne Report for Java EE Presentation Transcript

    • Yoshio TeradaJava Evangelisthttp://yoshio3.com, Twitter : @yoshioterada1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するもので す。また、情報提供を唯一の目的とするものであり、いかなる契約にも組み 込むことはできません。以下の事項は、マテリアルやコード、機能を提供す ることをコミットメント(確約)するものではないため、購買決定を行う際 の判断材料になさらないで下さい。オラクル製品に関して記載されている機 能の開発、リリースおよび時期については、弊社の裁量により決定されます 。 Oracleは、米国オラクルコーポレーション及びその子会社、関連会社の米国及びその他の国における登録商 標です。文中の社名、商品名等は各社の商標または登録商標である場合があります。2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Make the Future Java(Java の未来を創造)4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE の歴史 Lightweight Ease of Development Java EE 6 Java EE 5 Pruning, Web Services Extensibility Robustness Ease of Dev, Enterprise J2EE 1.4 CDI, JAX-RS Java Platform Ease of J2EE 1.3 Web Services Development, J2EE 1.2 Mgmt, Annotations, Web ProfileJPE Servlet, JSP, CMP, Deployment, EJB 3.0, JPA, EJB, JMS Connector JSF, Updated Servlet 3.0,Project Async Web Services RMI/IIOP Architecture Connector EJB 3.1 LiteMay 1998 Dec 1999 Sep 20110 Nov 2003 May 2006 Dec 2009 10 specs 13 specs 20 specs 23 specs 28 specs5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 今年の 8 月まで Java EE 7 のテーマ6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE のロードマップについてクラウド機能について Java EE 7 を 2013年春リリース Java EE 8 でクラウド対応7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ロードマップに対するフィードバック8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ロードマップに対するフィードバック Java EE はパッケージ方法、配備、移植性の面に注目 すると既に 90% がクラウド対応になっていると言え るでしょう。クラウド環境で必要な残り 10% の満た されてない事になると、経験を積んだ時に明らかにな るため、 まだ標準化を行う段階ではあ りません。 Apache ベンダーによる技術革新と総合して標準化を行います。 我々は現時点でまだこの分野において技術革新を行っ ていません。 David Blevins, Apache TomEE, Geronimo9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16
    • ロードマップに対するフィードバック 正しい判断です。 クラウドの標準化は市場に対して、非常に 大きな変化を与え悪い動きになります。 (支持 48%) twiigs10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16
    • ロードマップに対するフィードバック コミュニティの要望に応えるため Java EE 7 を再編成 する事は、 エキスパートグループの勇敢 で誠実な英断です。 2015 年の春に予定されている Java EE 8 でクラウド Java EE と PaaS 機能の実装を再度試みてください。 Consultant Markus Eisele, Java EE Consultant http://blog.eisele.net11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16
    • ロードマップに対するフィードバック Java EE の実装者として申し上げるならば、 我々(RedHat)はこの決断に対 し多いに支持しています。 私たちはかねてから Java EE コミュニティはまだク ラウドの標準化の準備ができていない事を提唱してき ました。そしてこれは私たちが提供するクラウドサー redhat ビスである OpenShift の実績によって感じています。 OpenShift は Java EE 6 とうまく適合しています。 Pete Muir, RedHat12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16
    • 末長く使われる技術の 標準化には準備期間が必要13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE の今後Java EE Java EE 7 – HTML 5 とシンプル化にフォーカス Java EE 8 – クラウド対応とモジュール化対応への 継続的な投資 Hasan Rizvi14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE の歴史 Simplicity & HTML5 Java EE 7 Lightweight Ease of JMS 2.0, Development Java EE 6 Batch, JCache, TX Java EE 5 Pruning, Interceptors Web Services Extensibility Robustness Ease of Dev, HTML5: Enterprise J2EE 1.4 WebSocket, CDI, JAX-RS Java Platform Ease of JSON J2EE 1.3 Web Services Development, J2EE 1.2 Mgmt, Annotations, Web Profile Web ProfileJPE Servlet, JSP, CMP, Deployment, EJB 3.0, JPA, EJB, JMS Connector JSF, Updated Servlet 3.0,Project Async Web Services RMI/IIOP Architecture Connector EJB 3.1 Lite JAX-RS 2.0May 1998 Dec 1999 Sep 20110 Nov 2003 May 2006 Dec 2009 CY 2013 10 specs 13 specs 20 specs 23 specs 28 specs 33+ specs15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • トピック Java EE 7 の Web Profile に JAX-RS 2.0 が導入16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE 7 へ含まれる予定の JSR 一覧 JAX-RS Java Caching JSP 2.2 JSF 2.2 EL 3.0 Portable 2.0 API (JSR-107) Extensions Servlet 3.1 Batch Bean Validation 1.1 Application (JSR-352) Common Interceptors 1.1 CDI 1.1 Annotations 1.1 Java API for JSON Managed Bean 1.0 EJB 3.2 (JSR-353) Java API for Connector WebSocket JPA 2.1 JTA 1.2 JMS 2.0 1.6 (JSR-356) 新規追加 大幅な更新 通常の更新17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE 7 の注目技術18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 今日ご紹介する内容 シンプル化に関するテーマ19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • WebSocket の詳細は 明日の JJUG CCC で !! でも少しだけ、デモ20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • WebSocket Twitter TimeLine アプリ RE Session Twitter4J Session RE Singleton Session Twitter RE WebSocket Endpoint Remote Endpoint21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 今日ご紹介する内容 シンプル化に関するテーマ22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSR 353 :Java API forProcessing JSON23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSON とは RFC 4627 The application/json Media Type for JavaScript Object Notation 軽量、テキストベース、プログラミング言語に非依存 移植性が高く、構造化されたデータ交換フォーマット{“name”:”Bob”,”age”:20,”phone”:[“276 1234”,”124 4567”]}24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSR 353 : Java API for Processing JSONStreaming & Object Model Streaming API – 低レベル – JSON の解析や生成の効率的な方法 Object Model API – 高レベル – Streaming よりもかんたんに実装可能 – Streaming API 上に実装25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSON API のアーキテクチャ APP1 APP2 ・・・ APP n Object Model便利な機能 API低レベルAPI Streaming API SPI JSON プロバイダ 26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSON データのサンプル{ "firstName": "John", "lastName": "Smith", "age": 25, "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ]} 27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Object Model API(扱い易い : DOM ライクな実装)28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Object Model API (扱い易い API) JsonObject JsonArray JsonBuilder JsonReader/JsonWriter29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSonObject Key / Value のペアで操作 Map <String, JsonValue> で操作可能30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSonObject から特定 Key の Value を取得Key と Value の型が分かっている場合に有効 { "firstName": "Yoshio", ……} JsonObject jobj = ... Map<String, JsonValue> map = jobj.getValues(); if (map.containsKey(“firstName”)) { JsonString jstring = jobj.getValue(“firstName”, JsonString.class); String lastName = jstring.getValue(); }31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSonObject から特定 Array を取得 "phoneNumber": [ { "type": "home”, ..}, { "type": "home”, ..} …… ]if (map.containsKey("phoneNumber")) { JsonArray jarray = jobj.getValue("phoneNumber", JsonArray.class); for (int i = 0; i < jarray.size(); i++) { JsonValue jvalue = jarray.getValue(i); if (jvalue.getValueType() == JsonValueType.OBJECT) {JsonObject jobj2 = jarray.getValue(i, JsonObject.class); 32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSonBuilder からJsonObject の生成{"KEY1":"VALUE1","KEY2":[{"KEY3","VALUE3”}]} JsonObject jsono = new JsonBuilder(). beginObject(). add("KEY1", "VALUE1"). beginArray("KEY2"). beginObject(). add("KEY3", "VALUE3"). endObject(). endArray(). endObject(). build();33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • I/O から JSonObject の読み込みtry (JsonReader reader = new JsonReader( new FileReader("/tmp/json.dat"));) { JsonObject jobj = reader.readObject(); Person person = json2Person(jobj); printPerson(person);} catch (IOException ioe) { ioe.printStackTrace();} 34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • I/O へ JSonObject の書き込み try (FileWriter f = new FileWriter( "/tmp/jsonout.dat"); JsonWriter writer = new JsonWriter(f)) { writer.writeObject(jsono); }catch(IOException ioe){ ioe.printStackTrace(); }35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 今日ご紹介する内容 シンプル化に関するテーマ36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSR 352: Batch Applications for the Java Platform37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • jbatch機能の一覧 バッチ処理用のフレームワーク Java SE / EE 環境で利用可能 バッチ処理に必要な、入力、処理、出力の実装を標準化 シーケンシャル、並列処理に対応38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • jbatch のアーキテクチャ 全体アーキテクチャ 1 Item Reader 1 Job 1 * Step 1 Item Operator Job 1 Processor 1 Item Writer Job Repository 139 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JobOperator ジョブ処理の全体を管理 (起動・停止・再起動・レポジトリ情報取得など) 1 Item Reader 1 Job 1 * Step 1 Item Operator Job 1 Processor 1 Item Writer Job Repository 140 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Job バッチの処理内容を隠蔽 JSL(ジョブ仕様記述言語)で記載した内容と関連付け 1 Item Reader 1 Job 1 * Step 1 Item Operator Job 1 Processor 1 Item Writer Job Repository 141 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Step バッチの処理内容を隠蔽 JSL(ジョブ仕様記述言語)で記載した内容と関連付け 方式:chunk, batchlet 1 Item Reader 1 Job 1 * Step 1 Item Operator Job 1 Processor 1 Item Writer Job Repository 142 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Job Specification Language(JSL : ジョブ仕様記述言語) <job id="job1" xmlns="http://batch.jsr351/js1"> <split id="split1"> <flow id="flow1" next="flow2"> <step id="step1" next="step2"> <batchlet ref="MyBatchlet"/> </step> <step id="step2" next="stepDONE"> <batchlet ref="MyBatchlet2"/> </step> </flow>… </job>43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Job Specification Language(JSL : ジョブ仕様記述言語) <flow id="flow2"> <step id="step3"> <chunk reader="MyReader" processor="MyProcessor" write="MyWriter” commit-interval=“2”> <properties> <property name="audit" value="true"/> </properties> </chunk> </step> </flow></split></job>44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • chunk 方式 バッチをアイテム(入力、処理、出力)毎に分けて実装 ItemReader : データの入力 ItemProcessor : データの処理 ItemWriter : データの出力 1 Item Reader 1 Job 1 * Step 1 Item Operator Job 1 Processor 1 Item Writer Job Repository 145 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • chunk 方式のシーケンス図の例 commit-interval =“2”の場合46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemReader インタフェースpackage javax.batch.api;import java.io.Externalizable;public interface ItemReader <T> {public void open(Externalizable checkpoint) throws Exception;public void close() throws Exception;public T readItem() throws Exception;public Externalizable checkpointInfo() throws Exception;} 47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemReader の実装例(インタフェース実装有)import javax.batch.api.ItemReader;@Namedpublic class MyReader implements ItemReader { ...} 48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemReader の実装例(インタフェース実装無)import javax.batch.annotation.*;@Namedpublic class MyReader { @Open void open(MyCheckpointData checkpoint) throws Exception {...} @Close void close() throws Exception {...} @ReadItem MyBatchInputRecord read() throws Exception {...} @CheckpointInfo Externalizable MyCheckpointData getChkpt() throws Exception {...}} 49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemProcessor インタフェースpackage javax.batch.api;public interface ItemProcessor <T, R> { public R processItem(T item) throws Exception;} 50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemReader と同様 ●インタフェースの実装有 ●インタフェースの実装無 (メソッドレベル・アノテーション)51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemWriter インタフェースpackage javax.batch.api;import java.io.Externalizable;import java.util.List;public interface ItemWriter <T> { public void open(Externalizable checkpoint) throws Exception; public void close() throws Exception; public void writeItems(List<T> items) throws Exception; public Externalizable checkpointInfo() throws Exception;} 52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • ItemReader と同様 ●インタフェースの実装 ●インタフェースの未実装 (メソッドレベル・アノテーション)53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Batchlet 方式 バッチを1つのタスクとして実装 一旦処理を実行すると最後まで処理を続行 Job 1 * Step 1 Operator Job 1 Batchlet Job Repository54 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Batchlet インタフェースpackage javax.batch.api;public interface Batchlet {public String process() throws Exception;public void stop() throws Exception;} 55 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Batchlet インタフェースpackage javax.batch.api; インタフェース実装有public interface Batchlet {public String process() throws Exception;public void stop() throws Exception;}@Named インタフェース実装無public class MyBatchLet{@Process String process() throws Exception {...}@Stop void stopMe() throws Exception {...}} 56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Job Repository Job に関する現在・過去の情報を保持 1 Item Reader 1 Job 1 * Step 1 Item Operator Job 1 Processor 1 Item Writer Job Repository 157 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 今日ご紹介する内容 シンプル化に関するテーマ58 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSR 343:Java™ Message Service 2.0 59 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JMS 2.0新機能の一覧 かんたんに実装できるようになったAPI – JMSContext, JMSProducer, JMSConsumer の追加 例外の実装方法の変更 既存 API に対する改善 CDI を利用した冗長コードの排除 注意: 去年の JavaOne 2011, クラウド機能は Java EE 8 へ JavaOne Tokyo 2012 の内容か ら若干変更あり60 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 既存のメッセージ送信コード @Resource( mappedName="jms/MyConnectionFactory” ) private static ConnectionFactory connectionFactory; @Resource( mappedName="jms/mySampleQueue” ) private static Queue queue; public void sendMessage(String text){ Connection con = connectionFactory.createConnection(); Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = session.createProducer(queue); TextMessage message = session.createTextMessage(text); message.setText(message); prod.send(message); con.close();}61 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 既存のコードの課題 @Resource( mappedName="jms/MyConnectionFactory” ) private static ConnectionFactory connectionFactory; 単なるメッセージ送信に @Resource( mappedName="jms/mySampleQueue” ) 中間オブジェクトが必要 private static Queue queue; public void sendMessage(String text){ Connection con = connectionFactory.createConnection(); Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = session.createProducer(queue); TextMessage message = session.createTextMessage(text); message.setText(message); prod.send(message); con.close();}62 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 既存のコードの課題 @Resource( mappedName="jms/MyConnectionFactory” ) private static ConnectionFactory connectionFactory; @Resource( mappedName="jms/mySampleQueue” ) 定型的なコード private static Queue queue; public void sendMessage(String text){ Connection con = connectionFactory.createConnection(); Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = session.createProducer(queue); TextMessage message = session.createTextMessage(text); message.setText(message); prod.send(message); con.close();}63 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 新規に JMSContext インタフェースを提供 JMSContext • 別々のクラスを1つに統合 – Connection Connection Session – Session • JMSProducer の提供 • JMSConsumer の提供javax.jms.JMSContext 64 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JMSContext を利用した実装例 メッセージ送信例 JMScontext = conFactory.createContext(); TextMessage textMsg = context.createTextMessage(message); context.createProducer(). send(queue, textMsg); メッセージ受信 JMSContext context = conFactory. createContext(AUTO_ACKNOWLEDGE); MessageListener mListener = new MyMsgListener(); context.createConsumer(dest).setMessageListener(mListener);65 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JMSProducer の利用例 (メソッド・チェーンによる設定) JMS 1.1 MessageProducer producer = session.createProducer(); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); producer.setPriority(1); producer.setTimeToLive(1000); producer.send(destination,message); JMS 2.0 context.createProducer().setDeliveryMode(DeliveryMode.NON_ PERSISTENT). setPriority(1).setTimeToLive(1000).send( destination,message);66 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 送信コードにおける既存のコードの課題 public void sendMessage(String text){ Connection con = null; try{ con = connectionFactory.createConnection(); Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = session.createProducer(queue); TextMessage message = session.createTextMessage(text); message.setText(message); prod.send(message); }finally{ 使用後コネクションの con.close(); クローズが必要 }67 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java SE 7 try-with-resource に対応 AutoCloseable (close() ) public void sendMessage(String text){ try(JMSContext context = conFactory.createContext();){ TextMessage message = session.createTextMessage(text); context.createProducer().send(outQueue,message); message.sendText(outQueue,message); } }68 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 送信コードにおける既存のコードの課題 public void sendMessage(String text){ try{ 例外処理の実装が ……// 必要 prod.send(message); }catch(JMSException jmse){ // }finally{ try{ if(con != null) con.close(); }catch (JMSException jmse2){ // }}}69 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 例外の実装方法が変更チェック例外から非チェック例外へ 過去の例外クラス 今後の例外クラス JMSException JMSRuntimeException TransactionRolledBackException TransactionRolledBackRuntimeException IllegalStateException IllegalStateRuntimeException InvalidDestinationException IllegalDestinationRuntimeException InvalidSelectorException InvalidSelectorRuntimeException MessageFormatException MessageFormatRuntimeException70 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 例外の実装方法が変更 例外が RuntimeException に変更 public void sendMessage(String text){ try{ ……// 送信処理 prod.send(message); } catch (JMSRuntimeException ex) { Logger.getLogger(getClass().getName()). log(Level.SEVERE, null, ex); } }71 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • アノテーションを利用した依存性注入 JMSContext に対する注入 @Inject @JMSConnectionFactory(“jms/MyConFactory”) private JMSContext context;  JNDI ルックアップでコンテナの接続ファクトリを使用 – コネクション・プール等を利用可能  JNDI 名を未指定時、システムのデフォルト使用72 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • アノテーションを利用した依存性注入 JMSContext に対する注入 @Inject @JMSConnectionFactory(“jms/MyConFactory”) @JMSPasswordCredential(userName=“admin”,password=“admin”) @JMSSessionMode(JMSContext.AUTO_ACKNOWLEDGE) private JMSContext context; パスワードやセッションモードの設定73 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 74 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE 6 までのメッセージ送信コード @Resource( mappedName="jms/MyConnectionFactory” ) private static ConnectionFactory connectionFactory; @Resource( mappedName="jms/mySampleQueue” ) private static Queue queue; public void sendMessage(String text){ Connection con = connectionFactory.createConnection(); Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = session.createProducer(queue); TextMessage message = session.createTextMessage(text); message.setText(message); prod.send(message);75 con.close(); its affiliates. All rights reserved. Copyright © 2012, Oracle and/or
    • Java EE 7 からのメッセージ送信コード @Inject @JMSConnectionFactory(“jms/MyConFactory”) private JMSContext context; @Resource(mappedName = “jms/queue”) private Queue queue; public void sendNewMessage(String msg){ context.createProducer().send(queue, msg); }76 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 今日ご紹介する内容 シンプル化に関するテーマ77 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • JSR 341:Expression Language 3.0 78 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • EL 3.0新機能の一覧 Lambda 式対応 – Array, List, Map の構成 コレクションに対するクエリ演算子(LINQ式) Java SE 環境で利用するためのAPIを提供 デフォルトの EL 実行環境マネージャの追加 クラス(static)変数、クラス(static)メソッド、enum 定数対応 クラス、パッケージのインポート79 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • EL 3.0新機能の一覧 名前空間を持つ Name – reference, import 関数定義 コンストラクタ 新しい演算子 – 文字列連結演算子、変数割当用演算子 型変換 表記の評価用のリスナー80 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Java EE 7 : 2013年 春頃 提供開始予定 テーマ:HTML5 と開発生産性の向上 Java EE 7 SDK の提供開始81 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • http://www.oracle.com/javaone82 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • New Announcement 2013 年 春頃 Java イベント開催予定83 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 84 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 85 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.