JessMA 3.5.1 Released

JessMA 3.5.1 update

  1. use Maven to build & publish JessMA:
    1) JessMA core
            <dependency>
                <groupId>org.jessma</groupId>
                <artifactId>jessma-core</artifactId>
                <version>3.5.1</version>
            </dependency>
    2) JessMA RESTful extension
            <dependency>
                <groupId>org.jessma</groupId>
                <artifactId>jessma-ext-rest</artifactId>
                <version>3.5.1</version>
            </dependency>
    3) JessMA Guice extension
            <dependency>
                <groupId>org.jessma</groupId>
                <artifactId>jessma-ext-guice</artifactId>
                <version>3.5.1</version>
            </dependency>
    4) JessMA Spring extension
            <dependency>
                <groupId>org.jessma</groupId>
                <artifactId>jessma-ext-spring</artifactId>
                <version>3.5.1</version>
            </dependency>
  2. use SLF4J logger replace LOG4J:
    1) JessMA Logger Object getting function : org.jessma.util.LogUtil.getJessMALogger()
    2) other Logger Object getting function : org.jessma.util.LogUtil.getLogger()
  3. other updates:
    1) all dependent jars update to the lastest version
    2) add maven sample project: ‘jessma-sample-hello’ and ‘jessma-sample-set’
    3) update development manual 《JessMA Java Web Application Development Framework (v3.3.1)》

JessMA 3.4.1 update

  1. update the version of Log4J to 2.x:
    1) Log4J’s default setting file: log4j2.xml
    2) default Logger Object getting function : org.jessma.util.LogUtil.getDefaultLogger()
    3) other Logger Object getting function : org.apache.logging.log4j.LogManager.getLogger()
  2. other updates:
    1) all the jar package of dependent library “jessma-lib” update to the latest version
    2) all the jar package of dependent library “spring-lib” update to the latest version
    3) update development manual 《JessMA Java Web Application Development Framework (v3.4.1)》
  3. the application update:
    1) JessMA 3.3.x update to JessMA 3.4.1 need to do something:
    A)  the last log4j-1.x’s dependent library  update to log4j-2.x(reference:“jessma-lib”)
    B)  change the code of getting Logger Object

JessMA 3.3.1 update

1、enhance internationalization features:

1) support the application’s default settings Locale and default Bundle
     A) If it is not configured to use the system’s default Locale original default Locale
     B) If you do not configure a default Bundle, Bundle default is ‘res.application-message’

    (Reference: The following MVC configuration file entries)

    <!–
        default-locale: the application default language options (default: in line with the current operating system)
       default-bundle: Default Application Bundle (default: res.application-message)
    –>
  <i18n default-locale=”en_US” default-bundle=”com.bruce.res.application-message” />

2) support of international opions: URL, Cookie or browser-based language
     A) org.jessma.mvc.i18n.URLI18nFilter: URL request parameter based interceptors internationalization
     B) org.jessma.mvc.i18n.CookieI18nFilter: Cookie-based international interceptor
     C) org.jessma.mvc.i18n.BrowserI18nFilter: browser-based international language options interceptor
     D) JessMA default based on Session internationalization, but you can configure these interceptors to the appropriate way to achieve
     E) above interceptor international property Request Attribute-based, and therefore shielded Session of the International settings
     F) above the interceptor can be used in combination, the general order: URL -> Cookie -> Browser

    (Example: The following configure : URL, Cookie and Browser three internationalization interceptors)

    <action-filters>
          <- Request parameter priority check whether the client request with the name of ‘__locale’ of -!>
        <filter  class=”org.jessma.mvc.i18n.URLI18nFilter“/>
         <-! Then checks whether the request with the name of ‘__locale’ The Cookie ->
        <filter  class=”org.jessma.mvc.i18n.CookieI18nFilter“/>
        <-! Finally, according to the client’s browser language option settings for the current request language attribute ->
        <filter  class=”org.jessma.mvc.i18n.BrowserI18nFilter“/>
    </action-filters>

2、support for JSR 303 Bean Validation mechanism:

1) If you open the Bean Validation mechanism, the application can perform automatic validation of the Form Bean annotated @ FormBean
2) @ FormBean annotation increase ‘validate ()’ and ‘groups ()’ two attributes that indicate whether to perform automatic validation of the Form Bean, and automatic verification of the validation group
3) If the automatic validation is successful then transferred to the Action validate () method to continue, otherwise an error message will be written Action collection of errors and jump to the INPUT view Action
4) The application can also call at any time ActionSupport of validateBean () / validateBeanAndAddErrors () method to validate any other Bean
5) increase in the error message output label , support a variety of ways and formats to display the error message (Reference: its implementation class org.jessma.tag.Error related note)

(Reference: The following MVC configuration file)

    <!–
         enable: whether to open the Bean Validation mechanism (default: on)
        bundle: validation text message Bundle (default: res.validation-message)
         validator: validator class (default: org.jessma.mvc.validation.HibernateBeanValidator)
     –>
    <bean-validation
        enable=”true
        bundle=”com.bruce.res.validation-message
        validator=”org.jessma.mvc.validation.HibernateBeanValidator
    />

3、other updates:

1) org.jessma.ext.dao. * Included in the category moved org.jessma.dao
2) the application by the default Bundle “res.message-resource” turn to “res.application-message”
3) Modify MVC master / slave configuration file, Sechema REST application configuration files and configuration file reference (reference MyJessMA Test Engineering)
4) Update Development Manual
5) finishing dependent libraries “jessma-lib”, delete the extra jar package

4、the application upgrade instructions:

1) JessMA 3.2.x Upgrade to JessMA 3.3.1 need to do some work:
     A) a reference to the original package to org.jessma.dao org.jessma.ext.dao
     B) the resource file “res.message-resource” to “res.application-message” or specify the configuration items in
     C) If necessary, modify the MVC configuration file , configuration file from the configuration file and the REST application of Sechema

The same file
     D) If you want to open the Bean Validation mechanism in Tomcat-6.0, you need to “tomcat_7_to_6_lib” folder under the three jar file to replace the Tomcat-6.0 lib directory under
2) Upgrade Portal-Basic 3.1.1 and earlier versions to JessMA 3.3.1: (Reference JessMA 3.2.1 upgrade instructions)


JessMA 3.2.3 update

1、An increase Guice support:

1) increase Guice plugin package jessma-ext-guice-3.2.3.jar used to integrate Guice
2) Action by @ GuiceBean / @ GuiceBeans annotation statement Guice Bean
3) Action by the interceptor com.bruce.ext.guice.GuiceInjectFilter parse @ GuiceBean / @ GuiceBeans annotation and inject Guice Bean
4) can be injected JessMA DAO object in Guice Bean, so the child can use JessMA DAO framework in Guice environment
5) increase the sample project MyJessMA example Guice integration

       (Note: Under normal circumstances, the application needs to create a subclass of GuiceInjectFilter and rewrite configModules () method ,which is used to define Module binding rules)

      public class MyGuiceInjectFilter extends GuiceInjectFilter
      {
          @Override
          protected Collection<Module> configModules()
          {
              Set<Module> modules = new HashSet<Module>();
               // Add the first Module
              modules.add(new Module()
              {
                  @Override
                  public void configure(Binder binder)
                  {
                      // Configure binding rules
                      // ……
                  }
              });
              // ……
              // Add the first N Module
              modules.add(new Module()
              {
                  @Override
                  public void configure(Binder binder)
                  {
                      // Configure binding rules
                      // ……
                  }
              });
              return modules;
          }
      }

2、Form Bean supports level attributes associated injection:

1) FormBean annotation support level attributes associated injection
2) org.jessma.util.BeanHelper of createBean (…) / setPropertiesOrFieldValues ​​(…) series method supports cascade assembly Bean

      (Example: The following corresponding Form Bean in, b, x, and y is an associate level Bean)

        <form>
          <input name=”a” value=”…”>
          <input name=”b.c” value=”…”>
          <input name=”b.d” value=”…”>
          <input name=”x.y.z” value=”…”>
      </form>

3、the standard “nested DAO method” calling convention (details Reference: Development Manual Section 10.6):

1) The outermost DAO objects must be created by FacadeProxy
2) the inner DAO objects can be created in any way, such as new or FacadeProxy
3) The outermost DAO method as a transaction unit, and does not have nested transactions
4) the transaction attribute specified by the outermost DAO methods, ignoring all the inner transaction attributes DAO methods

4、other updates:

1) dependent libraries “jessma-lib” all the jar package update to the latest version
2) dependent libraries “spring-lib” all the jar package update to the latest version
3)  increase the Guice dependency libraries “guice-lib”
4) Update Development Manual

5、 the application upgrade instructions:

1) JessMA 3.2.2 upgrade to JessMA 3.2.3: fully compatible, directly upgraded
2) Upgrade Portal-Basic 3.1.1 and earlier versions to JessMA 3.2.3: (Reference JessMA 3.2.1 upgrade instructions)


JessMA 3.2.2 update

1、org.jessma.dao.hbn.HibernateSessionMgr support automatic scanning physical objects:

1) the entity object with the @ Entity annotation to replace *. Hbm.xml mapping file (and also do not have to configure the ‘mapping’ in hibernate.cfg.xml)
2)app-config.xml when configuring HibernateSessionMgr, designated entity object with the optional second parameter to the regular expression where the packet format
       (For example: physical object is located in ‘com.bruce model..’ In)
      <manager name=”mgr-1” class=”org.jessma.dao.hbn.HibernateSessionMgr“>
            <initialize-args>
                  <arg></arg>
                  <arg>com\.bruce\..+\.model</arg>
            </initialize-args>
      </manager>

2、org.jessma.dao.mybatis.MyBatisSessionMgr support automatic scanning SQL Mapper interfaces:

1) do not have to configure ‘mapper’ in the mybatis.cfg.xml
2)when the app-config.xml configured MyBatisSessionMgr, the format specified SQL Mapper expression with an optional third parameter to the interface where the packets are

       (For example: SQL Mapper interface is located ‘com.bruce mapper..’ In)
      <manager name=”mgr-2” class=”org.jessma.dao.mybatis.MyBatisSessionMgr“>
            <initialize-args>
                  <arg></arg>
                  <arg></arg>
                  <arg>com\.bruce\..+\.mapper</arg>
            </initialize-args>
      </manager>

3、all JDBC Session Manager are canceled ‘isXml’ configuration parameters automatically recognize the file type based on the extension of the configuration file:

1) Affected Session Manager: DruidSessionMgr, JdbcSessionMgr, JndiSessionMgr, ProxoolSessionMgr

4、org.jessma.dao.FacadeProxy method of increasing executeCustomTransaction (…) to support the implementation of custom transaction:

1) JessMA transaction is DAO layer affairs, when an external call a DAO method, which can be a unit to perform a transaction. However, in some special cases it may be necessary to perform Service DAO layer external affairs (eg: multiple transactions need to call multiple methods DAO objects), then you need to create a custom transaction (CustomTransaction), and calls FacadeProxy of executeCustomTransaction (. ..) to execute the custom transaction.
2) add custom transaction-related interfaces:
A) CustomTransaction: custom transaction-based interfaces
B) JdbcTransaction: JDBC Custom Service Interface
C) MyBatisTransaction: MyBatis Custom Service Interface
D) HibernateTransaction: Hibernate custom transaction interfaces

       (Example)
      public static void serviceMethod()
      {
            //Get SessionMgr
            HibernateSessionMgr mgr = (HibernateSessionMgr)AppConfig.getSessionManager(“mgr-1“);
            // Perform custom affairs
            FacadeProxy.executeCustomTransaction(mgr, new HibernateTransaction(){
                  // Method to implement custom affairs
                  @Override
                  public void execute(HibernateSessionMgr mgr) throws DAOException
                  {
                        // Create dao1 (can not be used to create a DAO object FacadeProxy)
                        MyDaoA dao1 = new MyDaoA(mgr);
                        // Create dao2 (can not be used to create a DAO object FacadeProxy)
                        MyDaoB dao2 = new MyDaoB(mgr);

                        // Execute method: DAO
                        dao1.methodXxx();
                        dao2.methodYyy();
                        dao1.methodZzz();
                        dao2.methodNnn();
                  }});
      }

5、expanding mvc-confing.xml in alias configuration applications:

1) Support the alias defined in the configuration referenced in the preceding

      <!– (Example: The following configuration $ {index} actual path ‘/ jsp / test / index.jsp’) –>
      <result-path-aliases>
            <alias name=”jsp_base” path=”/jsp/test“/>
            <alias name=”index” path=”${jsp_base}/index.jsp“/>
      </result-path-aliases>

2) allows the use of aliases in ‘dispatch-file-path’ and ‘dispatch-file-path’ in the configuration

       (Example: the actual path of the following configurations ‘dispatch-file-path’ is ‘/ jsp’)
      <action-convention
            dispatch-file-path=”${ac_path}”
            < Other configuration (slightly) … –>
      />
      <result-path-aliases>
            <alias name=”ac_path” path=”/jsp“/>
      </result-path-aliases>

6、other updates:

1) Modify org.jessma.util.PackageHelper, adding packet scanning related methods
2) dependent libraries “jessma-lib” all the jar package update to the latest version
3)development manual update
4) Add a JessMA project template works: HelloJessMA

7、 the application upgrade instructions:

1) JessMA 3.2.1 upgrade to JessMA 3.2.2: fully compatible, can be directly upgraded
2)Upgrade Portal-Basic 3.1.1 and earlier versions to JessMA 3.2.2: (Reference JessMA 3.2.1 upgrade instructions)


JessMA 3.2.1 update

1、Portal-Basic Framework was officially renamed JessMA:

1) The version number of follow JessMA Portal-Basic version number
2) The package name com.bruce.* uniform to org.jessma.*

2、 mvc-confing.xml increase configuration items, support for custom $ {__base} variables:

1) base-path.type has three types: :’auto‘,’manual‘,’none‘, ‘auto‘ is the default type
2) ‘auto’: According to the path information for the current request is automatically set $ {__base} ($ {__base} stored in Request Attribute in)
       ${__base} = {scheme}://{server_name}:{server_port}/{app_context}
3) ‘manual’: manually set the MVC configuration file $ {__base} ($ {__base} saved in Application Attribute in)
4) ‘none’: do not set $ {__base}

3、mvc-confing.xml increase configuration items, support the use of replacement Action Result alias path:

               For example:

              <result-path-aliases>
                     <alias name=”index” path=”/jsp/index.jsp“/>
                     <alias name=”jsp_base” path=”/jsp/test“/>
              </result-path-aliases>

Here a few configurations are equivalent:

1) do not use an alias
       <result>/jsp/index.jsp</result>             or annotation@Result(path=”/jsp/index.jsp“)
       <result>/jsp/test/my.jsp</result>          or annotation @Result(path=”/jsp/test/my.jsp“)
2) 使用别名
       <result>${index}</result>                       or annotation@Result(path=”${index}”)
       <result>${jsp_base}/my.jsp</result>    or annotation@Result(path=”${jsp_base}/my.jsp“)

4、support without rebooting the server dynamically update the application configuration:

1) update the MVC configuration. org.jessma.mvc.ActionDispatcher increase methods:
       A) reload (delay) update MVC configuration
       B) pause () pause MVC components
       C) resume () resume MVC components
       D) with the use of these three methods: pause () -> reload (delay) -> resume ()
2) update the REST configuration. org.jessma.ext.rest.RestDispatcher increase methods:
       A) reload(delay)        reload (delay) updated REST configuration
       B) pause()                 pause () pause REST components
       C) resume()             resume () resume REST components
       D) with the use of these three methods: pause () -> reload (delay) -> resume ()
3) update the application configuration file (app-config.xml) of nodes. org.jessma.app.AppConfig increase methods:
       A) reloadUserConfig (delay) -> call UserConfigParser’s parse the / node defined (user) method to reload the configuration information node
       B) often need to pause before executing the update MVC components or REST components (call them pause () method)

5、modify org.jessma.util.Logger, so more generic Logger class:

1) The default logger: Application Name Default logger for ‘JessMA’, you can call Logger.getDefaultLogger () Gets the default logger
2) Other Logger: The application can call new Logger (“<logger_name>”) at any other place to get logging configured in log4j.properties

6、add a JDBC SessionMgr:

1) org.jessma.dao.jdbc.JdbcSessionMgr: do not use connection pooling JDBC SessionMgr

7、other updates:

1) The original test engineering MyPortal to MyJessMA

2) The dependent libraries portal-basic-lib to jessma-lib

3) dependent libraries “jessma-lib” and “spring-lib” all the jar package update to the latest version

4) to better support the deployment JessMA applications GAE, BAE and OpenShift cloud platforms such as

5) Update Development Manual

6) The official website www.jessma.org will continue to provide technical support

8、the application upgrade instructions:

JessMA 3.2.1 In terms of functionality is fully compatible with Portal-Basic 3.1.1, upgrade existing applications to JessMA 3.2.1 need to do the following:

1) All applications used com.bruce. * The place to org.jessma. *

2) modify the XML configuration file XSD Schema Reference (Reference MyJessMA Test Engineering)

3) If the application uses org.jessma.util.Logger, then get the code logger object to make some adjustments (refer MyJessMA Test Engineering)

4) If the application uses base.jsp, then replace the original base.jsp with JessMA 3.2.1 of jessma-base.jsp


Portal-Basic 3.1.1 update

1, supports asynchronous Action (“Asynchronous processing” is one of the new features of Servlet 3.0):

1) com.bruce.mvc adds asynchronous task interfaces and implementation classes AsyncTask AbstractAsyncTask, ActionTask
2) com.bruce.mvc.ActionSupport increase associated with asynchronous processing methods: startAsync (…)

2、supports asynchronous REST Action (implemented in the portal-basic-exe-rest-3.1.1 plug-in):

1) com.bruce.ext.rest adds asynchronous tasks REST implementation class RestActionTask
2) com.bruce.ext.rest.RestActionSupport increase support for asynchronous processing

3、add two JDBC SessionMgr:

1) com.bruce.dao.jdbc.DruidSessionMgr : database connection pool using Druid
2) com.bruce.dao.jdbc.JndiSessionMgr  :using JNDI database connection pool

4、other updates:

1) Test Engineering MyPortal add asynchronous processing requests and asynchronous Rest Action Action Request Example
2) All Hibernate and JDBC sample test engineering MyPortal are using Druid connection pool to replace the original Proxool
3) Development Guide “Portal-Basic Java Web Application Development Framework (v3.1.20130420)” adding “Asynchronous Action” section
4) Portal-Basic dependent libraries “portal-basic-lib” and “spring-lib” all of the jar package update to the latest version

5、the application upgrade instructions:

1) Portal-Basic “asynchronous processing” function 3.1.1 apply only supports Servlet 3.0 application environment (eg: JaveEE 6 / Tomcat 7)
2) If the application environment does not support Servlet 3.0 (eg: JaveEE 5 / Tomcat 6), you can only use the original function
3) Portal-Basic 3.1.1 is no longer available JDK 1.5 compatible version
4) Portal-Basic 3.1.1 is fully compatible with Portal-Basic 3.0.1 (non JDK 1.5 version)

Comments Are Closed