Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

View Poll Results: If you read it, did you find DirectJNgine User's Guide adequate?

Voters
54. You may not vote on this poll
  • Yes

    40 74.07%
  • No

    14 25.93%
  1. #151
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    111
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default


    We are currently investigating the servlet approach that and I believe are making some progress, will let you know once we have something workable.

    Thanks for the assistance

  2. #152
    Ext User
    Join Date
    Nov 2009
    Location
    china
    Posts
    5
    Vote Rating
    0
    dreamtaotao is on a distinguished road

      0  

    Default


    I like DirectJNgine. I tried to DirectJNgine with struts2 integration but it seems impossible, it seems not work with MVC frameworks is that right? For example struts2. If you can do to give some clarification. Thank you, sorry my English not good

  3. #153
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    DirectJNgine is only integrated with the servlet API at this moment.

    The layer on top of the engine that supports the servlet API is thin, and it should be possible to integrate it with other frameworks/libraries, but at this moment I know of no one who has attempted to integrate DirectJNgine with Struts 2.

    That said, I think you can install the DJN servlet and make it coexist with Struts 2, but whether this is applicable will depend on how you plan to use DJN. Deep integration might require extra work, but just using it to handle some chores should be possible.
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  4. #154
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    111
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default DirectJNgine / Spring Integration with Session Support

    DirectJNgine / Spring Integration with Session Support


    Good morning,

    We have been working with the djn-spring-1.1-rc1 library and have made a bunch of updates to the Spring Integration adding support for sessions.

    I have attached the source code and configuration files required for this to work.

    Basically it attempts to locate the Spring bean in the session first and if found uses that instance for invocation of the method, otherwise it asks Spring for the appropriately named bean.

    This is a very very rough first attempt at it and believe me there are many many opportunities for refactoring and improving this code but I wanted to get it out there for others to take a look at, possibly use and suggest improvements.

    Whatty
    Attached Files

  5. #155
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default Support for state management in DJN

    Support for state management in DJN


    Hi!

    After several request from DJN users I have dedided to add support for making it possible to access the following information easily from a DJN method:

    • HttpSession
    • ServletContext
    • HttpServletRequest
    • HttpServletResponse
    • HttpServlet
    • ServletConfig

    Besides, I am providing support for session and application scoped actions too.

    I have implemented this as an extension built on top of the DJN core, as I strongly feel that state management is an orthogonal concern, but I will include this in the same JAR, to make things easy

    Here is what I plan to support...

    Accessing the session, request, response, etc. from a DJN method
    You can acces the session, servlet context, request, response, servlet and servlet configuration using the WebContext and WebContextManager classes, as shown in the following code:

    Code:
    public class WebContextManagerTest {
      public static class WebContextInfo {
        public int callsInSession = 0;
        public int callsInApplication = 0;
        public String sessionId;
      }
      
      @DirectMethod
      public WebContextInfo test_webContext() {
        WebContext context = WebContextManager.get();
        HttpSession session = context.getSession();
        ServletContext application = context.getServletContext();
        
        // Keep a counter of how many times we have called 
        // this method in this session
        Integer callsInSession = 
          (Integer)session.getAttribute("callsInSession");
        if( callsInSession == null ) {
          callsInSession = new Integer(0);
        }
        callsInSession = new Integer(callsInSession.intValue() + 1);
        session.setAttribute("callsInSession", callsInSession);
    
        // Keep a counter of how many times we have called 
        // this method in this application
        Integer callsInApplication =
         (Integer)application.getAttribute("callsInApplication");
        if( callsInApplication == null ) {
          callsInApplication = new Integer(0);
        }
        callsInApplication = 
          new Integer(callsInApplication.intValue() + 1);
        application.setAttribute("callsInApplication", 
          callsInApplication);
        
        // Return status information
        WebContextInfo result = new WebContextInfo();
        result.callsInApplication = callsInApplication.intValue();
        result.callsInSession = callsInSession.intValue();
        result.sessionId = context.getSession().getId();
        return result;
      }
    }
    Making an action session-scoped
    To make an action session-scoped, just use the @ActionScope annotation as follows:

    Code:
    @ActionScope(scope=Scope.SESSION)
    public class SessionStatefulActionTest {
      private int count = 0;
    
      @DirectMethod
      public synchronized int test_getSessionCallCount() {
        this.count++;
        return this.count;
      }
    }
    Note how the only thing you need to do is to add the @ActionScope annotation.

    Making an action application-scoped
    To make an action application-scoped, just use the @ActionScope annotation as follows:

    Code:
    @ActionScope(scope=Scope.APPLICATION)
    public class ApplicationStatefulActionTest {
    
      private int data = 0;
      private int count = 0;
      private int pollData = 0;
      
      @DirectMethod
      public synchronized int test_getApplicationData() {
        this.data++;
        int result = this.data;
        
        // Trick to allow multiple test executions
        if( this.data == 2) {
          this.data = 0;
        }
        return result;
      }
      
      @DirectMethod
      public synchronized int test_getApplicationCallCount() {
        this.count++;
        return this.count;
      }
    Again, the only thing you need to do is to use the @ActionScope annotation.

    This functionality is currently in alpha, and feedback from DJN users will be welcome. I haven't polished all concurrency related issues, and will greatly appreciate you guys take a look at it.

    The attached JARs include the corresponding classes and source code.

    @vlagorce & other people working in DJN extensions
    Since some DJN internals have changed to make the DJN core completely independent of state management, you will probably have to make some little changes to your code. Sorry about that, guys.


    Besides, for those interested in having session and application scoped actions, you will probably be able to rely on the new functionality provided by DJN instead of having to implement it on your own.
    Attached Files
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  6. #156
    Ext User
    Join Date
    Nov 2009
    Location
    china
    Posts
    5
    Vote Rating
    0
    dreamtaotao is on a distinguished road

      0  

    Default


    I am pleased to DirectJNgine becoming more and more powerful. Just seen DirectJNgine-Spring, regret that so little information and no examples and documentation, and I hope we can DirectJNgine combined with the spring should be nice to do! I wish you success in your work that I have been watching the better DirectJNgine!

  7. #157
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    111
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default


    Pedro,

    First of all thank you very much for addressing Session support in the DirectJNgine.

    Having taken a look at the update, and already integrated it with the SessionAware spring integrator that I posted yesterday, I would like to suggest a simple modification to the RequestProcessorBase class that I believe will make it easier for integrating other bean controllers such as Spring

    In the method below, you grab the RegisteredMethod in which to service the request and allow the dispatcher to execute the method against the action instance

    Code:
    protected Object dispatch(Class<?> instanceClass, Method method, Object[] parameters) {
        return getDispatcher().dispatch( instanceClass, method, parameters );
    }
      
    // TODO: this is NOT something PollRequestProcessor will use. Handle somewhere else!
    protected Object dispatch( String actionName, String methodName, Object[] parameters ) {
        assert !StringUtils.isEmpty(actionName);  
        assert !StringUtils.isEmpty(methodName);
        assert parameters != null;
        
        RegisteredMethod method = getMethod( actionName, methodName);
        Object result = dispatch(method.getActionClass(), method.getMethod(), parameters);
        return result;
    }
    Since you pull the information out of the RegisteredMethod to make the call to dispatch method, you essentially loose track of the actionName. This action name is used by Spring to initiate the bean lookup.

    I had to override the JSON request processor to handle this situation as below:

    Code:
    protected Object dispatch( String actionName, String methodName, Object[] parameters ) {
            assert !StringUtils.isEmpty(actionName);  
            assert !StringUtils.isEmpty(methodName);
            assert parameters != null;
           
            
            RegisteredMethod method = this.getMethod(actionName, methodName);
            
            LOGGER.debug("actionName = " + method.getActionName() + ", methodName = " + method.getMethod().getName());
    
            Object result = this.dispatch(method, parameters);
            return result;
    }
    
    protected Object dispatch(RegisteredMethod method, Object[] parameters) {
            return ((SessionAwareSpringDispatcher)this.getDispatcher()).dispatch(method, parameters);
    }
    where instead of pulling the information out of the RegisteredMethod, I just pass it to the dispatcher. This makes action name available to the dispatcher, which I then use to lookup up the bean in the Spring Context.

    I could have used the action class name, but this puts an invalid dependency on the action name to class name association.

    I believe this small refactoring would make it easier for people to override the default behavior in the dispatch hierarchy for action instantiation, or in my case bean lookup by action name.

    Again I thank you and I am sure the community thanks you for your efforts.

    Whatty

  8. #158
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    111
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default


    Good afternoon,

    I have quickly updated the session aware Spring Integrator that I posted a few days ago to make the latest version of the DirectJngine 1.2-Alpha1.

    Again, it is very very rough and could probably do with some refactoring / cleanup but but is functional.

    To the author of the original Spring Integration, I updated some of your classes to match the new DirectJngine so please take a look.

    MMV (mileage may vary)

    Whatty
    Attached Files

  9. #159
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    Quote Originally Posted by Whatty View Post
    Pedro,

    First of all thank you very much for addressing Session support in the DirectJNgine.

    Having taken a look at the update, and already integrated it with the SessionAware spring integrator that I posted yesterday, I would like to suggest a simple modification to the RequestProcessorBase class that I believe will make it easier for integrating other bean controllers such as Spring

    In the method below, you grab the RegisteredMethod in which to service the request and allow the dispatcher to execute the method against the action instance

    Code:
    protected Object dispatch(Class<?> instanceClass, Method method, Object[] parameters) {
        return getDispatcher().dispatch( instanceClass, method, parameters );
    }
      
    // TODO: this is NOT something PollRequestProcessor will use. Handle somewhere else!
    protected Object dispatch( String actionName, String methodName, Object[] parameters ) {
        assert !StringUtils.isEmpty(actionName);  
        assert !StringUtils.isEmpty(methodName);
        assert parameters != null;
        
        RegisteredMethod method = getMethod( actionName, methodName);
        Object result = dispatch(method.getActionClass(), method.getMethod(), parameters);
        return result;
    }
    Since you pull the information out of the RegisteredMethod to make the call to dispatch method, you essentially loose track of the actionName. This action name is used by Spring to initiate the bean lookup.

    I had to override the JSON request processor to handle this situation as below:

    Code:
    protected Object dispatch( String actionName, String methodName, Object[] parameters ) {
            assert !StringUtils.isEmpty(actionName);  
            assert !StringUtils.isEmpty(methodName);
            assert parameters != null;
           
            
            RegisteredMethod method = this.getMethod(actionName, methodName);
            
            LOGGER.debug("actionName = " + method.getActionName() + ", methodName = " + method.getMethod().getName());
    
            Object result = this.dispatch(method, parameters);
            return result;
    }
    
    protected Object dispatch(RegisteredMethod method, Object[] parameters) {
            return ((SessionAwareSpringDispatcher)this.getDispatcher()).dispatch(method, parameters);
    }
    where instead of pulling the information out of the RegisteredMethod, I just pass it to the dispatcher. This makes action name available to the dispatcher, which I then use to lookup up the bean in the Spring Context.

    I could have used the action class name, but this puts an invalid dependency on the action name to class name association.

    I believe this small refactoring would make it easier for people to override the default behavior in the dispatch hierarchy for action instantiation, or in my case bean lookup by action name.

    Again I thank you and I am sure the community thanks you for your efforts.

    Whatty
    Hi!

    I didn't do it the way you suggest because poll methods need to be taken into account too, and I implemented them so they are 'global', i.e., they do not belong to a RegisteredAction, and therefore I can't pass the action name to the dispatch method for poll methods (sigh).

    But I can pass the class, and it is really useful sometimes, for example to process custom annotations -which is what I do to support stateful actions.

    As to way poll methods do not belong to a RegisteredAction, that made lots of sense when we had no stateful actions, as it made implementing some things much easier back then. Changing that now would change the published API...but I might do, because that part of the API is rarely used, to be fair...On the other hand, I was aware that if I had made that change, I would have had the RegisteredAction available, and passing that to dispatch would make additional info available, including the action name you want...

    So, I need to consider carefully how or whether to pass the additional info you suggest. Let me think about that, ok?

    Thanks for the feedback

    Best regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  10. #160
    Sencha User
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    lxbzmy is on a distinguished road

      0  

    Exclamation can not call a directmethod when strign contains \n \r etc

    can not call a directmethod when strign contains \n \r etc


    can not call a directmethod when a string param contains \n \r etc?
    why?

Thread Participants: 86

  1. Animal (5 Posts)
  2. barton (4 Posts)
  3. Condor (1 Post)
  4. mauro_monti (6 Posts)
  5. mbarto (1 Post)
  6. aconran (1 Post)
  7. MoShAn480 (1 Post)
  8. asgillett (2 Posts)
  9. seade (4 Posts)
  10. zaqwsxqwer (3 Posts)
  11. Sesshomurai (16 Posts)
  12. ThierryC (3 Posts)
  13. maxm165 (3 Posts)
  14. techstudios (2 Posts)
  15. sayonara (2 Posts)
  16. kschlaudt (1 Post)
  17. hschaefer123 (2 Posts)
  18. omarc (2 Posts)
  19. lxbzmy (4 Posts)
  20. mct (6 Posts)
  21. mediacept (2 Posts)
  22. dionisexorcius (1 Post)
  23. alper (1 Post)
  24. steverc (2 Posts)
  25. chrizmaster (18 Posts)
  26. J@y (21 Posts)
  27. Georgioa (6 Posts)
  28. wguan (1 Post)
  29. minneyar (16 Posts)
  30. jhoweaa (1 Post)
  31. Ramez (2 Posts)
  32. malus (1 Post)
  33. dweller (8 Posts)
  34. stdunbar (1 Post)
  35. vlagorce (20 Posts)
  36. cwilliso (1 Post)
  37. Whatty (13 Posts)
  38. Ice (1 Post)
  39. clynnh (1 Post)
  40. SreevaniN (1 Post)
  41. Stsalomon90 (1 Post)
  42. GregT (9 Posts)
  43. jcalfee (6 Posts)
  44. set_ti (1 Post)
  45. maho2nd (3 Posts)
  46. dreamtaotao (3 Posts)
  47. Toxa (4 Posts)
  48. tungchau (3 Posts)
  49. wlan0 (2 Posts)
  50. jpr (2 Posts)
  51. gianmarco (5 Posts)
  52. extjslikeit (2 Posts)
  53. harmen_wessels (1 Post)
  54. Olivercomputing2 (4 Posts)
  55. vanessa_ng (2 Posts)
  56. alois.cochard (5 Posts)
  57. kyrillos52 (2 Posts)
  58. Tod (1 Post)
  59. Alinanila (1 Post)
  60. tfannon (2 Posts)
  61. Kynao (1 Post)
  62. feiq (4 Posts)
  63. dalt (1 Post)
  64. xfolch (1 Post)
  65. avijit (1 Post)
  66. marcelsnews (2 Posts)
  67. maddhippy (1 Post)
  68. sritter (1 Post)
  69. july (2 Posts)
  70. jtkeller7983 (1 Post)
  71. lfranchini (2 Posts)
  72. 7/11 (2 Posts)
  73. yAdEs (1 Post)
  74. zazz (1 Post)
  75. waqar (5 Posts)
  76. pjain11 (1 Post)
  77. alexMobimesh (2 Posts)
  78. zachHurt (4 Posts)
  79. n0n3 (5 Posts)
  80. adavis2 (1 Post)
  81. mark.peters (1 Post)
  82. lee el (4 Posts)
  83. frengo19 (3 Posts)
  84. prakashwagle (1 Post)
  85. extejnar (2 Posts)
  86. alin@sonatype.com (1 Post)