ã¯ããã«
ããã®é£è¼ã§ã¯ããGlassFishãã¨ãã製åãå©ç¨ãã¦ãJavaè¨èªã«è¦ªããã§ããããã¨ãç®çã¨ãã¦ãã¾ãã第1åç®ã®ä»åã¯ãæ®æ®µã¯ãã¾ãæèããªããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¨ã¯ä½ããã«ç¦ç¹ãå½ã¦ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®å½¹å²ãæ¹ãã¦å¦ãã§ããããã¨æãã¾ãã
対象èªè
- Javaã§ãªã«ãããã®ã¢ããªã±ã¼ã·ã§ã³ãä½æãããã¨ã®ããæ¹
- Javaã®å¤æ°ã®å®£è¨ããifæã»foræã»whileæã®å¶å¾¡æãè¸ã¾ãã¦ã¢ããªã±ã¼ã·ã§ã³ãä½æãããã¨ã®ããæ¹
ããªãã¸ã§ã¯ãæåããã°ã©ãã³ã°ãã§ããªãã¨ãæ§ãã¾ãããå¾ã ã«å¦ãã§ãããã°ã¨èãã¦ãã¾ããã¾ããå¦ã³ãããWebã¢ããªã±ã¼ã·ã§ã³ããµã³ãã«ã¨ããã®ã§ãWebã¢ããªã±ã¼ã·ã§ã³ã¨ã¯éã£ãåéãåå¼·ãããæ¹ã«ã¯å½é£è¼ã¯åãã¦ãã¾ããã
æ¹ãã¦ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã£ã¦ä½ã ãã
ãGlassFishãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®1ã¤ã§ããæè¿ã§ã¯éçºç°å¢ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®é¢åãè¦ã¦ããããããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®å½¹å²ãåããã¥ãããªã£ã¦ãã¦ãã¾ããããã¯ããã§éçºããã«ã¯åºç¤ãç解ããæéãçãããã¸ãã¹ãã¸ãã¯ã«å°å¿µã§ããã¨ããã¡ãªãããããã¾ãããJavaã®ç解ãæ·±ãããã®ã§ããã°ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®å½¹å²ãç¥ããã¨ãéè¦ã§ããJavaãç解ããã«ã¯è¨èªä»æ§ãéçºç°å¢ã®ç解ãé常ã«éè¦ã§ããããã解説ããå ¥éæ¸ãããããããã¾ããå½é£è¼ã§ã¯GlassFishãéãã¦ä»ä¸åº¦ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¨ãã観ç¹ããJavaãç解ãã¦ããããã¨èãã¦ãã¾ãã
ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¯ä½ããã£ã¦ãããã®ã
ãã¾ããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã®æå³ãã¦ã£ãããã£ã¢ã®ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ããã®ãµã¤ãå ã®è¨è¼ããããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¨å¼ã¶å ´åãä¸è¬ã«ã¯ Java EEãæ¡ç¨ããWebã¢ããªã±ã¼ã·ã§ã³ãµã¼ããæããã¨ããç®æã«éå®ãã¦ä½¿ç¨ãã¾ããããã¾ã¨ãããããã解説ãªã®ã§ããã²ç®ãéãã¦ã¿ã¦ãã ããã
ãJavaå ¥éè ãããJava SEã®ã¤ã³ã¹ãã¼ã«ãçµãã£ããã©ãJava EEãã©ãããã¤ã³ã¹ãã¼ã«ãããåãããªããã¨ãã質åãåãããã¨ãããã¾ãããããã質åãããããã®ããªã¨æãã¾ããJava EEã¨ããå ´åãJava EEã®ä»æ§ãæãã®ããJava EEã®ä»æ§ãå®è£ ãã製åãæãã®ãææ§ã«ä½¿ç¨ããããã¨ãå¤ãããã ã¨æãã¾ããã¾ããSunãReference Implementationãæä¾ãã¦ããé ã®åæ®ããããã¾ããï¼ä»ã§ãæä¾ãã¦ããã®ã調ã¹ã¦ãã¾ãããæ¬çã¨ã¯é¢ä¿ãªãã®ã§ã容赦ãã ããï¼ã
ãå½é£è¼ã§ç´¹ä»ããGlassFishãä¸è¨ã®ãããªå®ç¾©ã§ã®ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã§ãããã®ãããJava EEã®ä»æ§ã«å¾ã£ã製åã§ã¯ããã¾ããããã¹ã¦ããµãã¼ããã¦ãããã©ããã¯ããã¥ã¢ã«çã§èª¿ã¹ãå¿ è¦ãããã¾ããä¾ãã°ãTomcatã¯JSPãServletã¯ãµãã¼ããã¦ããEJBã¯ãµãã¼ããã¦ãã¾ãããGlassFishã®ä¸ã«ã¯Tomcatã®è¡ãæµãã¦ãã¾ãããGlassFishã¯EJBããµãã¼ããã¦ãã¾ãããã®ããã«è£½åã«ãã£ã¦éãããããããJava EEã®ä½ããµãã¼ããã¦ããããç¥ããã¨ã¯éè¦ãªãã¨ã§ãã
ãã¾ãã次ã®ãããªæ©è½ãGlassFishã¯åãã¦ãã¾ãã
- JMS(Java Message Service)
- JNDI(JavaNaming and Directory Interface)
- JavaMail
- JBI(Java Business Integration)
- ORB(Object Request Broker)
ãä¸è¨ã®ã¨ãããJavaãå¦ç¿ããã«ã¯ååãããã»ã©ã®æ©è½ãå«ã¾ãã¾ããJNDI以å¤ã¯å½å ¥éç·¨ã§ã¯èª¬æãã¾ãããå¿ç¨ç·¨ãæ¸ãæ©ä¼ãããã°ãã²èª¬æãããã¨ããã§ãã
ãé£ããè¨èã°ããåºã¦ãã¦ä½è¨ã«ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãããªãã ãåãããªããªã£ã¦ãã¾ãã¾ããã誤解ãæããã«çè ãªãã®è¨èã使ãã¨ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¨ã¯ããæ¥åã·ã¹ãã ã®éçºã»æ§ç¯ã»éç¨ã«èãããJavaã®æ©è½ãä¹ãããµã¼ããã§ãããããä¹±æ´ãªè¨ãæ¹ã«ãªãã¾ããããæåã¯ãããããã®ç解ã§å§ãã¾ããããããããç解ãæ·±ã¾ãã«ã¤ãããã®å®ç¾©ã¯å´©ãã¦ãã¾ããã¨ã«ããä½ããç解ããã«ã¯é£ããå®ç¾©ããã§ã¯ãªãèªåãªãã«è§£éãããã®ã常ã«ä¿®æ£ãã¦ããæ¹ãã¯ããã«æ¥½ã§ãããèªåã®ä¸ã§ã¤ã¡ã¼ã¸ãåºã¾ã£ã¦ããã®ã楽ãããªã£ã¦ãã¾ãã
ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¨ããã©ã人ãããããããã¸ã§ã¯ãããããã®ä½¿ãæ¹ãããããã§ãããç½®ãããç¶æ³ã«ãã£ã¦ãå¤ããã¾ããã¤ã¾ãããã¼ã¿ãã¼ã¹ãµã¼ããããªã³ã¿ãµã¼ãããã¡ã¤ã«ãµã¼ããªã©ã¨åãããã«ãå©ç¨è ã«ããæ©è½ãæä¾ãããµã¼ãã§ãããã¢ããªã±ã¼ã·ã§ã³ãä¹ããããã®ãµã¼ããç¹ã«æ¥åã·ã¹ãã ã®ä½¿ç¨ã«èããããµã¼ããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¨ä»ã®æç¹ã§ã¯ç解ãã¦ããã¾ãããã
GlassFishã使ãã«ã¯
ã以åã¯ã³ãã³ãã©ã¤ã³ã使ã£ã¦éçºããæ¹ãè¨èªãç¿å¾ããä¸ã§ã¯å¹æçã§ããã¨è¨ãããçè ããã®ããã«èãã¦ãã¾ããããããã10å¹´ã¶ããããã«ä»äºã§ããã°ã©ãã³ã°ããæ©ä¼ããããJavaçµé¨1å¹´ã®ã¡ã³ãã¼ã®ä»äºã¶ããè¦ã¦èãæ¹ãå¤ããã¤ã¤ããã¾ããéçºãã¼ã«ãå®ã«ãã¾ã使ããçè ã®10åã¯çç£æ§ãé«ãã®ã§ããèå¿ã®ãã¸ãã¯é¨åã¯ãªãã¸ã§ã¯ãæåã®ç解ä¸è¶³ããåé·ãªè¨è¿°ã«ãªã£ã¦ãããä»ã®æè¡è ãè¦ã¦ç解ãã¥ãããã®ã§ããããå®éã®ä»äºã§ã¯çç£æ§ãæ±ãããããã¨ãèããã¨ãã³ãã³ãã©ã¤ã³ã§ã¯é常ã«è¦ããã®ãç¾ç¶ã§ããå¾ã£ã¦ãéçºãã¼ã«ã®ç¿çã¨ã¨ãã«è¨èªã®åºç¤ãJavaã®å ´åã§ããã°ãªãã¸ã§ã¯ãæåçãªä½ãæ¹ãå¦ã¶å¿ è¦ãããã¾ãã
ãå½é£è¼ã§ã¯éçºãã¼ã«ã¨ãã¦NetBeansã使ç¨ãã¤ã¤ãè¨èªã®åºç¤ã説æããäºå®ã§ããå·çæç¹ï¼2009å¹´12æ19æ¥ï¼ã§ã¯GlassFishãç¶ç¶ãã¦éçºãããã¨ãOracleããå ¬è¡¨ããã¦ãã¾ãããNetBeansã«ã¤ãã¦ã¯æè¨ããã¦ãã¾ãããããããNetBeansããªããªããã¨ã¯ãªãã§ããããã³ãã¥ããã£ã¯åç¶ããNetBeansã¯çãæ®ã£ã¦ããã¾ããçããã®å¤ãã¯Eclipseã使ã£ã¦ããã¨æãã¾ãããEclipseã«ç¿çãã¦ããæ¹ãNetBeansã§ã®éçºããè¦ããã¾ããéçºãã¼ã«ã®å¤æ§ããç¥ããã¨ã§ãéçºã®å ´é¢ã«ãã使ãåããå¯è½ã¨ãªãããã§ãã