::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

Tomcat/Mysql/Apache Shindig ±â¹ÝÀÇ Social Site ±¸ÃàÇϱâ

°Ô½ÃÆÇ
Jsp, Applet, Servlet
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2009-09-08 11:02:51
ÀÐÀº¼ö
3335
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ

http://mimul.com/pebble/default/2009/03/19/1237455480000.html

±âÁ¸ Sun Social Site´Â GlassFish ±â¹ÝÀ¸·Î µÇ¾î ÀÖ¾î
Tomcat ȯ°æ¿¡¼­ ±¸µ¿ÇÒ·Á¸é °í»ýÀ» Á» ÇÏ°Ô µË´Ï´Ù. Àú¸¸ ±×·±°¡¿ä? ^^
¾Æ·¡¿Í °°Àº ¼øÀ¸·Î µû¶óÇÏ½Ã¸é µË´Ï´Ù.

1. SocialSite ¿ÀÇ ¼Ò½º ´Ù¿î·Îµå

    - SVN : https://socialsite.dev.java.net/svn/socialsite/trunk


2. JNDI Resource ¼³Á¤

    - Context Ãß°¡

    <Context path="/socialsite" >
        <Resource name="jdbc/SocialSite_DB" auth="Container"
                type="javax.sql.DataSource" user="test" username="test"
                password="testadmin" driverClassName="com.mysql.jdbc.Driver"
                url="jdbc:mysql://localhost:3306/socialsite" maxActive="100" maxIdle="30"
                maxWait="10000" scope="Shareable" />
        <Resource name="mail/SocialSite/Session" auth="Container"
                type="javax.mail.Session" description="Mail Session for SocialSite"
                scope="Shareable" />
    </Context>
    <Context path="/sampleapp" >
        <Resource name="jdbc/SocialSite_DB" auth="Container"
                type="javax.sql.DataSource" user="test" username="test"
                password="testadmin" driverClassName="com.mysql.jdbc.Driver"
                url="jdbc:mysql://localhost:3306/socialsite" maxActive="100" maxIdle="30"
                maxWait="10000" scope="Shareable" />
        <Resource name="mail/SocialSite/Session" auth="Container"
                type="javax.mail.Session" description="Mail Session for SocialSite"
                scope="Shareable" />
    </Context>


3. socialsite/META-INF/persistence.xml ¼öÁ¤ (sampleapp/META-INF/persistence.xmlµµ µ¿ÀÏ)

    - ÁÖ¼® ó¸®
    <!--<non-jta-data-source>java:comp/env/jdbc/SocialSite_DB   </non-jta-data-source>-->

    - Ãß°¡
    <properties>
        <property name="eclipselink.jdbc.platform" value="oracle.toplink.platform.database.mysql"/>
        <property name="eclipselink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
        <property name="eclipselink.jdbc.url" value="jdbc:mysql://localhost:3306/socialsite"/>
        <property name="eclipselink.jdbc.user" value="test"/>
        <property name="eclipselink.jdbc.password" value="testadmin"/>
    </properties>


4. °ü·Ã ¶óÀ̺귯¸® Ä«ÇÇ

    - JAX-WS site ¿¡¼­ ÇÊ¿äÇÑ ¶óÀ̺귯¸® ´Ù¿î TOMCAT_HOME/shared/lib Ä«ÇÇ
    - for_tomcat/geronimo-jpa_3.0_spec-1.0.jar,jstl.jar, org.eclipse.persistence.jpa-1.0.jar, serializer.jar, standard.jar, wstx-asl-3.2.8.jar, xalan.jar
    TOMCAT_HOME/common/lib Ä«ÇÇ
    - sjsxp.jar, stax-api-1.0.jar TOMCAT_HOME/common/endorsed Ä«ÇÇ
    - MySQL JDBC Driver (mysql-connector-java-5.0.8-bin.jar)  
    TOMCAT_HOME/common/lib Ä«ÇÇ


5. Tomcat ¼³Á¤ º¯°æ

    - server.xml Ãß°¡
    <Realm className="org.apache.catalina.realm.JDBCRealm"
            driverName="org.gjt.mm.mysql.Driver"
            connectionURL="jdbc:mysql://localhost:3306/socialsite"
            connectionName="test" connectionPassword="testadmin"
            userTable="userapi_user" userNameCol="username"
            userCredCol="passphrase" userRoleTable="userapi_userrole_view"
            roleNameCol="rolename" resourceName="SocialSite_UserRealm"
            digest="SHA" />
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

    - Tomcat SSL ¼³Á¤
    . keytool -genkey -keyalg rsa -alias tomcat -keystore tomcat.ks -storepass tomcat
    . tomcat.ks ÆÄÀÏÀÇ Ä«ÇÇ À§Ä¡´Â TOMCAT_HOME/
    . °ü·Ã Á¤º¸ ÀÔ·Â ´ÙÀ½ "¿¹" ÀÔ·Â
    . <Connector port="8443" ¶óÀο¡ keystoreFile="tomcat.ks" keystorePass="tomcat" Ãß°¡


6. mysql Å×ÀÌºí »ý¼º

    - dbscript/mysql/createdb.sql ½ÇÇà
    - admin user »ý¼º(CreateAdmin.java ÂüÁ¶)
    . Á÷Á¢ Äõ¸® ¸¸µé¾î¼­ insert Çصµ µÇ°í jsp ÆäÀÌÁö Çϳª ¸¸µé¾î¼­ È£ÃâÇؼ­ ³Ö¾îµµ µÊ


7. Social Site ºôµå

    - ºôµåÇϸé socialsite.war, sampleapp.war °¡ dist µð·ºÅ丮¿¡ ÀúÀåµÊ
    - socialsite.war, sampleapp.war TOMCAT_HOME/webapps Ä«ÇÇ


8. »çÀÌÆ® ·±Äª È­¸é

    - sampleapp

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
2476 helix 6765 2010-08-02 20:19:02
2203
[0] Struts2
helix 3258 2009-10-26 12:33:59
helix 3335 2009-09-08 11:02:51
1899 helix 3267 2009-05-07 20:55:24
1898 helix 7657 2009-05-07 20:26:08
1887 helix 7021 2009-04-28 19:37:56
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.016 Secs