public synchronized static Engine create ( String engineName ) { if ( StrKit . isBlank ( engineName ) ) { throw new IllegalArgumentException ( "Engine name can not be blank" ) ; } engineName = engineName . trim ( ) ; if ( engineMap . containsKey ( engineName ) ) { throw new IllegalArgumentException ( "Engine already exists : " + engineName ) ; } Engine newEngine = new Engine ( engineName ) ; engineMap . put ( engineName , newEngine ) ; return newEngine ; }
Create engine with engine name managed by JFinal