달력

08

« 2017/08 »

  •  
  •  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  •  
  •  
2011.07.12 15:35

spring security + sitemesh 적용시 filter 순위 Tips2011.07.12 15:35

spring security + sitemesh 적용시 filter 순위에 따라, security tag가 먹힐수도 아닐수도 있다.

아래와 같이 하면 보통 문제 없다. security filter가 먼저 나오면 된다.

    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
    </filter>    
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>        
    <filter>
        <filter-name>CharacterEncodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>CharacterEncodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>   



layout 예시는 아래와 같이....

<spring:url value="/static/j_spring_security_logout?spring-security-redirect=/xxxx_login" var="logout"/>
<div id="head">
<h1><img src="<spring:url value="/resources"/>/images/admin/logo.gif" /></h1>
<div class="toputil">
<p><b><sec:authorize access="hasRole('ROLE_ADMIN')">+</sec:authorize><sec:authentication property="principal.username"/></b>님 접속하셨습니다.</p>
<ul>
<li class="fir"><a href="${logout}">로그아웃</a></li>
</ul>
</div>

 
신고
Posted by summerwars
2011.07.11 10:01

Spring + Akka 예제(Blocking) Terracotta2011.07.11 10:01

설정은 None Blocking과 똑 같고, 메서드 콜후, 리턴값이 있으면 당연히 Blocking이 된다. 

1) Test 코드
 

@Test

public void blocking(){
System.out.println("1) 메일 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
googleGmailService.findAll(GoogleDataFixture.getGmailResult());
System.out.println("1) 메일 호출 끝=========================================================");
System.out.println("2) 문서 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
googleDocsService.findAll(GoogleDataFixture.getDocsResult());
System.out.println("2) 문서 호출 끝=========================================================");
System.out.println("3) 일정 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
googleCalendarService.findAll(GoogleDataFixture.getCalendarResult());
System.out.println("3) 일정 호출 끝=========================================================");
}



2) Test 코드 실행 결과 (로그) 

09:59:41.730 [main] DEBUG o.s.orm.jpa.JpaTransactionManager - Participating in existing transaction
1) 메일 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:59:41.756 [main] INFO  a.d.LazyExecutorServiceWrapper - Lazily initializing ExecutorService for 
09:59:41.762 [akka:event-driven:dispatcher:global-1] DEBUG akka.dispatch.MonitorableThread - Created thread akka:event-driven:dispatcher:global-1
11
메일시작-----------------------------------
One More Week to Trial Premium Features
Final notice: Google Apps accounts will be automatically transitioned
UCM news: Out of beta at the end of June!
Improve Your Project Financials
UCM news: Smart Mail screencast online
Two week notice: Google Apps accounts will be automatically transitioned
Getting the Most out of Mavenlink
Take control with Manymoon
New features: Real-time Activity Feeds
Hello from Glasscubes
[Expensify Newsletter] Automatic Receipt Scanning, Categorization
메일끝-----------------------------------
1) 메일 호출 끝=========================================================
2) 문서 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:59:42.663 [akka:event-driven:dispatcher:global-2] DEBUG akka.dispatch.MonitorableThread - Created thread akka:event-driven:dispatcher:global-2
문서시작-----------------------------------
2011-07-05 XXX 견적서_XXXXXXX
2011-07-04 Google Apps Deployment Guide _XXX .doc
2011-07-01 XXX  견적서_XXX 
2011-07-04 Google Apps Deployment Guide _ XXX .doc
2011-07-04 XXX  구글 앱스 운용을 위한XXX  정보.docx
문서시작-----------------------------------
2) 문서 호출 끝=========================================================
3) 일정 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:59:43.934 [akka:event-driven:dispatcher:global-3] DEBUG akka.dispatch.MonitorableThread - Created thread akka:event-driven:dispatcher:global-3
일정시작-----------------------------------
XXX 관광
XXX 학교
XXX  Deployment
XXX  Deployment
Apps 테스트 일정
일정끝-----------------------------------
3) 일정 호출 끝=========================================================
09:59:45.201 [main] DEBUG o.s.t.c.t.TransactionalTestExecutionListener - No method-level @Rollback override: using default rollback [true] for test context [[TestContext@6d79953c testClass = GoogleServiceSupervisorTest, locations = array<String>['classpath*:/META-INF/spring/applicationContext*.xml', 'file:src/main/webapp/WEB-INF/spring/webmvc-config.xml', 'file:src/main/webapp/WEB-INF/spring/jersey-config.xml'], testInstance = net.max.wp.actor.GoogleServiceSupervisorTest@4934ce4a, testMethod = blocking@GoogleServiceSupervisorTest, testException = [null]]]
09:59:45.202 [main] DEBUG o.s.orm.jpa.JpaTransactionManager - Initiating transaction rollback

 
신고

'Terracotta' 카테고리의 다른 글

Spring + Akka 예제(Blocking)  (0) 2011.07.11
Spring + Akka 예제 (None Blocking)  (0) 2011.07.11
TAG akka, spirng
Posted by summerwars
2011.07.11 09:45

Spring + Akka 예제 (None Blocking) Terracotta2011.07.11 09:45

None Blocking 테스트 예제임. 호출 명령이 실행 완료후, 결과값이 구글로 부터 찍히는 것을 확인할수 있다. Spring 설정은 상당히 구려 보이는데, 이는 개선될 필요가 있다. AKKA의 특성을 감안하더라도... 어쩌자고 이따위 설정 구조 밖에 못했는지 이해하기 힘든.... (<akka:supervision> 테그는 제대로 동작하지도 않았다.)

1) XML 설정

<beans xmlns:akka="http://akka.io/schema/akka"
http://akka.io/schema/akka http://akka.io/akka-1.0.xsd >

<akka:typed-actor 
 id="googleGmailService"
 interface="net.max.wp.google.service.GoogleGmailService"
 implementation="net.max.wp.google.service.impl.GoogleGmailServiceImpl"
 timeout="5000" 
 scope="singleton">
<property name="googleDataTemplate" ref="googleDataTemplate"/>
<property name="feedUrl" ref="google.mail.feed"/>
<property name="linkUrl" ref="google.mail.linkurl"/>
</akka:typed-actor>     
<akka:typed-actor 
 id="googleDocsService"
 interface="net.max.wp.google.service.GoogleDocsService"
 implementation="net.max.wp.google.service.impl.GoogleDocsServiceImpl"
 timeout="5000"
 scope="singleton">
<property name="googleDataTemplate" ref="googleDataTemplate"/>
<property name="feedUrl" ref="google.docs.feed"/>
</akka:typed-actor>     
<akka:typed-actor 
 id="googleCalendarService"
 interface="net.max.wp.google.service.GoogleCalendarService"
 implementation="net.max.wp.google.service.impl.GoogleCalendarServiceImpl"
 timeout="5000"
 
 scope="singleton">
<property name="googleDataTemplate" ref="googleDataTemplate"/>
<property name="feedUrl" ref="google.calendar.feed"/>
</akka:typed-actor> 



2) Test 코드

@Test
public void non_blocking(){
System.out.println("1) 메일 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
googleGmailService.call(GoogleDataFixture.getGmailResult());
System.out.println("1) 메일 호출 끝=========================================================");
System.out.println("2) 문서 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
googleDocsService.call(GoogleDataFixture.getDocsResult());
System.out.println("2) 문서 호출 끝=========================================================");
System.out.println("3) 일정 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
googleCalendarService.call(GoogleDataFixture.getCalendarResult());
System.out.println("3) 일정 호출 끝=========================================================");


3) Test 실행결과(로그)

09:48:59.640 [main] DEBUG o.s.orm.jpa.JpaTransactionManager - Participating in existing transaction
1) 메일 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:48:59.733 [main] INFO  a.d.LazyExecutorServiceWrapper - Lazily initializing ExecutorService for 
1) 메일 호출 끝=========================================================
2) 문서 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:48:59.742 [akka:event-driven:dispatcher:global-1] DEBUG akka.dispatch.MonitorableThread - Created thread akka:event-driven:dispatcher:global-1
2) 문서 호출 끝=========================================================
3) 일정 호출 시작+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:48:59.922 [akka:event-driven:dispatcher:global-2] DEBUG akka.dispatch.MonitorableThread - Created thread akka:event-driven:dispatcher:global-2
3) 일정 호출 끝=========================================================
09:48:59.941 [akka:event-driven:dispatcher:global-3] DEBUG akka.dispatch.MonitorableThread - Created thread akka:event-driven:dispatcher:global-3
09:49:00.075 [main] DEBUG o.s.t.c.t.TransactionalTestExecutionListener - No method-level @Rollback override: using default rollback [true] for test context [[TestContext@4934ce4a testClass = GoogleServiceSupervisorTest, locations = array<String>['classpath*:/META-INF/spring/applicationContext*.xml', 'file:src/main/webapp/WEB-INF/spring/webmvc-config.xml', 'file:src/main/webapp/WEB-INF/spring/jersey-config.xml'], testInstance = net.max.wp.actor.GoogleServiceSupervisorTest@29d381d2, testMethod = non_blocking@GoogleServiceSupervisorTest, testException = [null]]]
09:49:00.076 [main] DEBUG o.s.orm.jpa.JpaTransactionManager - Initiating transaction rollback
09:49:00.076 [main] DEBUG o.s.orm.jpa.JpaTransactionManager - Rolling back JPA transaction on EntityManager [org.hibernate.ejb.EntityManagerImpl@2da3e9cb]
09:49:00.076 [main] DEBUG o.h.transaction.JDBCTransaction - rollback
09:49:00.077 [main] DEBUG o.h.transaction.JDBCTransaction - re-enabling autocommit
09:49:00.077 [main] DEBUG o.h.transaction.JDBCTransaction - rolled back JDBC Connection
09:49:00.077 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
09:49:00.078 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
09:49:00.080 [main] DEBUG o.s.orm.jpa.JpaTransactionManager - Closing JPA EntityManager [org.hibernate.ejb.EntityManagerImpl@2da3e9cb] after transaction
09:49:00.097 [main] DEBUG o.s.o.jpa.EntityManagerFactoryUtils - Closing JPA EntityManager
09:49:00.098 [main] INFO  o.s.t.c.t.TransactionalTestExecutionListener - Rolled back transaction after test execution for test context [[TestContext@4934ce4a testClass = GoogleServiceSupervisorTest, locations = array<String>['classpath*:/META-INF/spring/applicationContext*.xml', 'file:src/main/webapp/WEB-INF/spring/webmvc-config.xml', 'file:src/main/webapp/WEB-INF/spring/jersey-config.xml'], testInstance = net.max.wp.actor.GoogleServiceSupervisorTest@29d381d2, testMethod = non_blocking@GoogleServiceSupervisorTest, testException = [null]]]
09:49:00.104 [main] DEBUG o.s.t.c.s.DirtiesContextTestExecutionListener - After test method: context [[TestContext@4934ce4a testClass = GoogleServiceSupervisorTest, locations = array<String>['classpath*:/META-INF/spring/applicationContext*.xml', 'file:src/main/webapp/WEB-INF/spring/webmvc-config.xml', 'file:src/main/webapp/WEB-INF/spring/jersey-config.xml'], testInstance = net.max.wp.actor.GoogleServiceSupervisorTest@29d381d2, testMethod = non_blocking@GoogleServiceSupervisorTest, testException = [null]]], class dirties context [false], class mode [null], method dirties context [false].
09:49:00.105 [main] DEBUG o.s.t.c.s.DirtiesContextTestExecutionListener - After test class: context [[TestContext@4934ce4a testClass = GoogleServiceSupervisorTest, locations = array<String>['classpath*:/META-INF/spring/applicationContext*.xml', 'file:src/main/webapp/WEB-INF/spring/webmvc-config.xml', 'file:src/main/webapp/WEB-INF/spring/jersey-config.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false].
09:49:00.169 [Thread-1] INFO  o.s.c.s.GenericApplicationContext - Closing org.springframework.context.support.GenericApplicationContext@627a4489: startup date [Mon Jul 11 09:48:46 KST 2011]; root of context hierarchy
09:49:00.173 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
09:49:00.173 [Thread-1] INFO  o.s.b.f.s.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@38f8ff42: defining beans [org.springframework.security.web.PortMapperImpl#0,org.springframework.security.web.context.HttpSessionSecurityContextRepository#0,org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy#0,org.springframework.security.authentication.ProviderManager#0,org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler#0,org.springframework.security.access.vote.AffirmativeBased#0,org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0,org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator#0,org.springframework.security.authentication.AnonymousAuthenticationProvider#0,org.springframework.security.web.savedrequest.HttpSessionRequestCache#0,org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0,org.springframework.security.openid.OpenIDAuthenticationFilter#0,org.springframework.security.openid.OpenIDAuthenticationProvider#0,org.springframework.security.config.http.UserDetailsServiceInjectionBeanPostProcessor#0,org.springframework.security.filterChainProxy,org.springframework.security.authenticationManager,demoAuthenticationProvider,userDetailsService,org.springframework.security.openid.ext.OpenIdAuthenticationHandler,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.springframework.context.config.internalBeanConfigurerAspect,accountDataOnDemand,companyDataOnDemand,gadgetDataOnDemand,layerDataOnDemand,pageDataOnDemand,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,transactionManager,org.springframework.transaction.config.internalTransactionAspect,entityManagerFactory,googleDataTemplate,dozerMapper,googleGmailService,googleDocsService,googleCalendarService,google.calendar.feed,google.docs.feed,google.mail.feed,google.mail.linkurl,akka.actor.timeout,akka.remote.server.port,akka.remote.server.hostname,googleController,openIdController,indexController,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#1,org.springframework.web.servlet.handler.MappedInterceptor#1,org.springframework.web.servlet.handler.MappedInterceptor#2,org.springframework.web.servlet.config.viewControllerHandlerAdapter,org.springframework.web.servlet.config.viewControllerHandlerMapping,messageSource,localeResolver,themeSource,themeResolver,org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#0,multipartResolver,org.springframework.web.servlet.view.InternalResourceViewResolver#0,googleResource,googleServiceProviderImpl]; root of factory hierarchy
09:49:00.182 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#39': [org.springframework.web.servlet.config.viewControllerHandlerMapping]
09:49:00.184 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#31': [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0]
09:49:00.187 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean 'org.springframework.web.servlet.i18n.LocaleChangeInterceptor#0': [org.springframework.web.servlet.handler.MappedInterceptor#2]
09:49:00.188 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean 'org.springframework.web.servlet.theme.ThemeChangeInterceptor#0': [org.springframework.web.servlet.handler.MappedInterceptor#1]
09:49:00.188 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#30': [org.springframework.web.servlet.handler.MappedInterceptor#0]
09:49:00.190 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'entityManagerFactory'
09:49:00.190 [Thread-1] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'persistenceUnit'
09:49:00.190 [Thread-1] INFO  o.hibernate.impl.SessionFactoryImpl - closing
09:49:00.192 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy method 'close' on bean with name 'dataSource'
09:49:00.197 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean 'layerDataOnDemand': [net.max.wp.gadget.domain.GadgetDataOnDemand]
09:49:00.197 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean 'pageDataOnDemand': [net.max.wp.layer.domain.LayerDataOnDemand]
09:49:00.197 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean 'companyDataOnDemand': [net.max.wp.page.domain.PageDataOnDemand]
09:49:00.198 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'org.springframework.context.config.internalBeanConfigurerAspect'
09:49:00.308 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'org.springframework.security.filterChainProxy'
09:49:00.308 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#14': [org.springframework.security.filterChainProxy]
09:49:00.308 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#14'
09:49:00.308 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#15'
09:49:00.309 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#16': [(inner bean)#16]
09:49:00.330 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#16'
09:49:00.330 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#18': [(inner bean)#18]
09:49:00.331 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#20': [(inner bean)#20]
09:49:00.331 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#18'
09:49:00.331 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#24'
09:49:00.331 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#25'
09:49:00.332 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#26'
09:49:00.332 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#27': [(inner bean)#27]
09:49:00.332 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#27'
09:49:00.332 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#28': [(inner bean)#28]
09:49:00.332 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name '(inner bean)#28'
09:49:00.333 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'org.springframework.security.openid.OpenIDAuthenticationFilter#0'
09:49:00.333 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#8': [org.springframework.security.openid.OpenIDAuthenticationFilter#0]
09:49:00.334 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#10': [(inner bean)#10]
09:49:00.340 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0'
09:49:00.341 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#6': [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0]
09:49:00.341 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#5': [org.springframework.security.web.savedrequest.HttpSessionRequestCache#0]
09:49:00.341 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#3': [(inner bean)#3, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0]
09:49:00.342 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#2': [org.springframework.security.access.vote.AffirmativeBased#0]
09:49:00.342 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)': [org.springframework.security.authentication.ProviderManager#0]
09:49:00.343 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#1': [(inner bean)#1]
09:49:00.343 [Thread-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean 'googleCalendarService': [net.max.wp.actor.GoogleServiceSupervisorTest]
09:49:00.343 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'googleCalendarService'
11
메일시작-----------------------------------
One More Week to Trial Premium Features
Final notice: Google Apps accounts will be automatically transitioned
UCM news: Out of beta at the end of June!
Improve Your Project Financials
UCM news: Smart Mail screencast online
Two week notice: Google Apps accounts will be automatically transitioned
Getting the Most out of Mavenlink
Take control with Manymoon
New features: Real-time Activity Feeds
Hello from Glasscubes
[Expensify Newsletter] Automatic Receipt Scanning, Categorization
메일끝-----------------------------------
일정시작-----------------------------------
XXX 관광
XXX 학교
XXX  Deployment
XXX  Deployment
Apps 테스트 일정
일정끝-----------------------------------
09:49:02.767 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'googleDocsService'
문서시작-----------------------------------
2011-07-05 XXX 견적서_XXXXXXX
2011-07-04 Google Apps Deployment Guide _XXX .doc
2011-07-01 XXX  견적서_XXX 
2011-07-04 Google Apps Deployment Guide _XXX .doc
2011-07-04XXX  구글 앱스 운용을 위한 XXX  정보.docx
문서시작-----------------------------------
09:49:02.831 [Thread-1] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'googleGmailService'
09:49:02.836 [Thread-1] INFO  akka.actor.Scheduler$ - Starting up Scheduler 

신고

'Terracotta' 카테고리의 다른 글

Spring + Akka 예제(Blocking)  (0) 2011.07.11
Spring + Akka 예제 (None Blocking)  (0) 2011.07.11
TAG akka, Spring
Posted by summerwars
2010.12.10 20:53

watchmaker로 구현된 gep4j 소개 Watchmaker2010.12.10 20:53

Watchmaker Framework 기반으로 GEP(Gene Expression Programming)를 만들어 보자는 뜻으로 gep4j 오픈소스를 진행하는 것 같다. 이제막 생겼으니 두고 보자.

그럼 GEP가 무엇이냐... 하는것은 여기(A Quick Introduction to Gene Expression Programming)를 보자. 요즘, 이쪽분야에 좀 뜸했는데, 다시 힘을 내어 봐야 겠다.

이쪽분야는 이론적인것 보다는 경험적인게 중요한것 같다. 특정 주제에 대한 많은 경험이 좀더 진실?(목적)에 가까운 값을 얻을수 있을테니까... 그리고 그것이 곧 경쟁력이 될것이니까...

다시 공업수학 책부터 뒤져봐야지.... 내년엔 이분야로 경험을 쌓는게 주요 목표중에 하나다. 반드시... 경험(프로젝트에 적용)해야 한다...
신고
Posted by summerwars
2010.09.30 11:17

SpringRoo GWT 생성 로그보기 SpringRoo2010.09.30 11:17

이전글(SpringRoo GWT 예제 테스트)에서 테스트한 내용을 콘솔기준으로 살펴본다. gwt setup 명령으로 생성된 것들은 실행된 로그를 보면, 어떤것들이 생성되고, 관리되어지는지 알수 있다. 그 로그를 분리하여 보자. (STS 프로젝트명은 'gwt1' 이다)

~.domain.Account roo> gwt setup
Created SRC_MAIN_WEBAPP\WEB-INF\spring
Created SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
Created SRC_MAIN_WEBAPP\WEB-INF\web.xml
Managed SRC_MAIN_WEBAPP\WEB-INF\web.xml

gwt명령을 하기전까지는 일반적인 SpringRoo 프로젝트로 Entity기준으로 생성된 구조이다. 여기에 UI 부분을 기존의 Spring Web MVC가 아닌, GWT를 사용하는 것이다. 따라서, 기존의 'controller all' 명령과 비슷하게, Web 프로젝트 관련 파일들을 생성한다. 그 첫번째로, Servelt 설정파일인, webmvc-config.xml파일을 생성하고, web.xml에 DispatcherServlet 관련 web 설정을 생성한다. web.xml을 생성하자마자, Managed 되는데, 이는 gwt1 servlet 관련 설정을 추가하는 것으로 보인다.


Managed ROOT\pom.xml [Added dependency org.springframework:spring-web:${spring.version}]
Managed ROOT\pom.xml [Added dependency org.springframework:spring-webmvc:${spring.version}]
Managed ROOT\pom.xml [Added dependency org.springframework.webflow:spring-js:2.1.1.RELEASE]
Managed ROOT\pom.xml [Added dependency commons-digester:commons-digester:2.0]
Managed ROOT\pom.xml [Added dependency commons-fileupload:commons-fileupload:1.2.1]
Managed ROOT\pom.xml [Added dependency javax.servlet:jstl:1.2]
Managed ROOT\pom.xml [Added dependency javax.el:el-api:1.0]
Managed ROOT\pom.xml [Added dependency joda-time:joda-time:1.6]
Managed ROOT\pom.xml
Managed ROOT\pom.xml [Added dependency com.google.gwt:gwt-servlet:2.1-SNAPSHOT]
Managed ROOT\pom.xml [Added dependency com.google.gwt:gwt-user:2.1-SNAPSHOT]
Managed ROOT\pom.xml [Added dependency org.json:json:20090211]
Managed ROOT\pom.xml
Managed SRC_MAIN_WEBAPP\WEB-INF\web.xml
Managed SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml

GWT 프로젝트도 스프링웹 모듈을 사용하기 때문에 관련 jar를 추가하고, gwt jar도 추가하는 pom 관련 로그이다. 마지막에 web.xml도 추가 되는데, 이것은 gwt 요청 관련 servlet(RequestFactoryServlet) 설정을 등록하기 위해서 추가되는 것으로 보인다. (이것은 나중에 생성된 소스코드 분석할때나 또는 Roo모듈인 GWT플러그인 코스를 살펴볼때 좀더 알아본다.) webmvc-config.xml 파일은 '<mvc:view-controller path="/" view-name="/ApplicationScaffold.html"/>' 이라는 시작점 html이 추가된것 이외에는 특이할만한 사항이 없다.


Created SRC_MAIN_JAVA\net\max\gwt
Created SRC_MAIN_JAVA\net\max\gwt\ApplicationScaffold.gwt.xml
Created SRC_MAIN_JAVA\net\max\gwt\ApplicationCommon.gwt.xml
Created SRC_MAIN_JAVA\net\max\gwt\ApplicationMobileScaffold.gwt.xml

XXX.gwt.xml은 gwt 모듈 설정 파일이다. 나는 하나의 Entity를 등록했는데 3개의 설정파일이 생겼다. 소스코드 내용은 나중에 살펴보기로 하고, 대략 설명하면, ApplicationCommon.gwt.xml 은 모든 모듈 설정파일에 공통으로 포함되는것을 빼놓은것으로 PHP의 include 를 생각하면 되겠다. ApplicationScaffold.gwt.xml 가 메인 시작점(entry-point)이다. ApplicationMobileScaffold.gwt.xml은 덤으로 모바일용까지 생성한다. (왜 '덤'까지 만들고 있는지는 알수 없다. 안그래도 생성되는 파일이 많아서 복잡한데...)


Created SRC_MAIN_JAVA\net\max\gwt\request
Created SRC_MAIN_JAVA\net\max\gwt\scaffold
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\gwtLogo.png
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldShell.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldMobileShell.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldShell.ui.xml
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\Scaffold.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldMobileShell.ui.xml
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\mobile.css
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldMobile.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\rooLogo.png
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldPlaceHistoryHandler.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\createButton.png
Created SRC_MAIN_JAVA\net\max\gwt\ui
Created SRC_MAIN_JAVA\net\max\server

UI 관련 폴더를 만들고, 주로 scaffold 폴더의 파일들을 생성하고 있다. Scaffold.java 파일이 GWT의 EntryPoint를 구현하고 있어서 UI의 가장 핵심 폴더이다. 주요 생성 파일만 설명하면 아래와 같다.
 - ScaffoldShell.java : UI를 꾸미는 panel, widget 같은 값을 얻음
 - ScaffoldShell.ui.xml : UI 템플릿 파일
 - Scaffold.java : App의 시작점으로 UI,Data까지 모든것을 바인딩함
 - ScaffoldPlaceHistoryHandler.java : 히스토리 핸들러 인터페이스


Created SRC_MAIN_WEBAPP\ApplicationMobileScaffold.html
Created SRC_MAIN_WEBAPP\ApplicationScaffold.html

html 시작점 페이지 생성, 역시 모바일용과 함께 생성된다.


Created SRC_MAIN_JAVA\net\max\gwt\style
Created SRC_MAIN_JAVA\net\max\gwt\style\Style.gwt.xml
Created SRC_MAIN_JAVA\net\max\gwt\style\client
Created SRC_MAIN_JAVA\net\max\gwt\style\client\userIcon.png
Created SRC_MAIN_JAVA\net\max\gwt\style\client\Styles.java
Created SRC_MAIN_JAVA\net\max\gwt\style\client\groupIcon.png
Created SRC_MAIN_JAVA\net\max\gwt\style\client\openGradient.png
Created SRC_MAIN_JAVA\net\max\gwt\style\client\common.css
Created SRC_MAIN_JAVA\net\max\gwt\style\client\selectionGradient.png
Created SRC_MAIN_JAVA\net\max\gwt\shared

CSS 생성, GWT는 css도 자바로 읽어 들여서, 메서드에서 효과를 주기도 한다. Styles.java가 css 리소스를 읽어 들이는데 쓰인다.


Created SRC_MAIN_JAVA\net\max\gwt\ui\AccountActivitiesMapper.java
Created SRC_MAIN_JAVA\net\max\gwt\ui\AccountEditActivity.java
Created SRC_MAIN_JAVA\net\max\gwt\ui\AccountDetailsActivity.java
Created SRC_MAIN_JAVA\net\max\gwt\ui\AccountListActivity.java

Entity인 Account의 액션들을 처리해 주는 것들로, Controller의 액션 처리 메서드로 생각하면 되겠다.


Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountListView.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountListView.ui.xml
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountDetailsView.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountDetailsView.ui.xml
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountEditView.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountEditView.ui.xml
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountRecordRenderer.java

Entity인 Account의 액션들을 보여 주는 것들로, jspx페이지의 list.jspx, create.jspx 파일의 테그 템플릿 쯤으로 생각해도 되겠다.


Created SRC_MAIN_JAVA\net\max\gwt\request\AccountRecordChanged.java
Created SRC_MAIN_JAVA\net\max\gwt\request\AccountChangedHandler.java
Created SRC_MAIN_JAVA\net\max\gwt\request\AccountRecord.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountListViewBinder.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountDetailsViewBinder.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\generated\AccountEditViewBinder.java

Created SRC_MAIN_JAVA\net\max\gwt\request\AccountRequest.java
Created SRC_MAIN_JAVA\net\max\gwt\request\ApplicationEntityTypesProcessor.java
Created SRC_MAIN_JAVA\net\max\gwt\request\ApplicationRequestFactory.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ApplicationListPlaceRenderer.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldFactory.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ApplicationMasterActivities.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ApplicationDetailsActivities.java
Created SRC_MAIN_JAVA\net\max\gwt\scaffold\ScaffoldMobileActivities.java

GWT에서 서버로 요청을 하고 그 결과를 넘겨주는데, 일반적인 XML이나 JSON 방식이 아닌, 객체로 하는데, 그냥 객체가 아닌 Reocde된 것으로 그런 제반사항을 처리해 주는 클래스 및 인터페이스들이다. 사실 이 멋진 방법들 때문에, 생성되는 파일수가 많다. 그리고 GWT 프로젝트의 특정 패턴(Factory를 이용한 컴포넌트 생성 방법 등)과 aspect적인 클래스들이 한꺼번에 생성되어 복잡해 보인다. 비슷한 기능을 하는 SmartGWT Server Framework에서는 비교적 잘 정리되어 있는것에 반해서 아직 Roo은 만들어지는 과정에 있는듯한 느낌을 지울수 없다.(실제로 생성된 소스코드엔 TODO 메시지가 자주 보인다.)

다음은, 코드 구조보기...

신고
TAG GWT, SpringRoo
Posted by summerwars


티스토리 툴바