Seasar DI Container with AOP

REQUIREMENT

S2 requires JDK1.4 or JDK1.5 to run.

SETUP

  • Download S2xxx.zip, and Unzip it!
  • Import seasar2 directory as an existing project to Eclipse.
    • Select menu 'File -> Import... -> Existing Project into workspace'

CLASSPATH

For using the basic function of Seasar2(S2Container, S2AOP), you need to include the following files in CLASSPATH.

  • lib/aopalliance-1.0.jar
  • lib/commons-logging-1.0.4.jar
  • lib/geronimo-j2ee_1.4_spec-1.0.jar (refer to below)
  • lib/javassist-3.0.jar
  • lib/ognl-2.6.5.jar
  • lib/s2-framework-2.x.x.jar
  • lib/log4j-1.2.8.jar (optional)
  • resources/log4j.properties (optional)
  • resources/aop.dicon (optional)

For using the extended function of Seasar2(S2JTA, S2DBCP, S2JDBC, S2Unit, S2Tx, and S2DataSet), you need to include the following files in CLASSPATH.

  • lib/junit-3.8.1.jar
  • lib/poi-2.5-final-20040804.jar
  • lib/s2-extension-2.x.x.jar
  • lib/geronimo-jta_1.0.1B_spec-1.0.jar (refer to below)
  • lib/geronimo-ejb_2.1_spec-1.0.jar (refer to below)
  • resources/jdbc.dicon

Selects geronimo-j2ee_1.4_spec-1.0.jar, geronimo-jta_1.0.1B_spec-1.0.jar or geronimo-ejb_2.1_spec-1.0.jar responding to the application evnironment.

environment geronimo-j2ee_1.4_spec-1.0.jar geronimo-jta_1.0.1B_spec-1.0.jar geronimo-ejb_2.1_spec-1.0.jar
Servlet Container not implementing J2EE full spec
(Tomcat etc.)
unnecessary necessary
(using S2JTA,S2Tx)
necessary
(using S2Tiger)
Application Server implementing J2EE full spec
(JBoss, WebSphere, WebLogic etc)
unnecessary unnecessary unnecessary
Standalone necessary unnecessary unnecessary

HSQLDB is included so that you can try the function of a database easily. You need to configurate XADataSourceImpl in jdbc.dicon in accordance with your environment.

Let's try Kijimuna Eclipse Plugin for S2Container.

Using EJB3 Annotation, the operations are as follows.

  • Download S2Tigerxxx.zip, and Unzip it!
  • Import s2-tiger directory as an existing project to Eclipse.
    • Select menu 'File -> Import... -> Existing Project into workspace'
  • Add following jar file to CLASSPATH.
    • lib/s2-tiger-x.x.x.jar
    • src/examples/resources/jndi.properties

Using Tiger Annotation, the operations are as follows.

  • Download S2Tigerxxx.zip, and Unzip it!
  • Import s2-tiger directory as an existing project to Eclipse.
    • Select menu 'File -> Import... -> Existing Project into workspace'
  • Add following jar file to CLASSPATH.
    • lib/s2-tiger-x.x.x.jar

Using Backport175 Annotation, the operations are as follows.

  • Download S2Backport175xxx.zip, and Unzip it!
  • Import s2-backport175 directory as an existing project to Eclipse.
    • Select menu 'File -> Import... -> Existing Project into workspace'
  • Add following jar file to CLASSPATH.
    • lib/s2-backport175-x.x.x.jar
    • lib/backport175-x.x.jar

Let's try backport175 Eclipse plugin.