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. #101
    Ext User
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    0
    vlagorce is on a distinguished road

      0  

    Default


    A new idea

    For my spring integration I'm passed through the RegistryConfiguration, but override the scanner could be a (better?) solution.

    It's allow ..
    - reuse mechanism to retrieve action and method (In my implementation I've duplicate a part of code (ActionScanner)).
    - change annotation type (ex: use is own annotation with more params).

    - change annotation detection (ex: spring allow to find annotation through inheritance contrary to myClass.getAnnotation() ) .

    - change method name prefix.
    To do that the Scanner instantiation should be done in a createMethod() and almost all method should be protected .

  2. #102
    Ext User
    Join Date
    Mar 2007
    Location
    Rosario / Argentina
    Posts
    21
    Vote Rating
    0
    mauro_monti is on a distinguished road

      0  

    Post


    Hi Vlagorce,

    I have to say that you are making an excelent work with the integration of DirectJNgine - Spring. I am making some test with the JARS, in the previous posts. It's looks very well.

    I had some problems to configure the Api File and Folder. For example, if in my ApiActionConfiguration have:

    Code:
    <bean id="apiConfiguration" class="com.extjs.djn.spring.action.conf.impl.ActionApiConfiguration">
            <property name="apiName" value="dst" />
            <property name="apiNamespace" value="Ext.dst" />
            <property name="apiFile" value="/dst/Api.js" />
        </bean>
    I get an IOException saying \dst\Api-debug.js' exists but is a directory...
    Do you know how to solve this problem?...

    On the other hand, i watched the class SpringRegistryConfiguration. Seems that registry actions, obviating the action paramete of the annotated class. Here is my contribution:

    SpringRegistryConfigurator - Line 49

    Code:
    for (IDirectAction directAction : actionApiConfiguration.getListActions()) {
    	Class<?> actionClass = directAction.getClass();
    	final DirectAction directActionAnnotation = (DirectAction)actionClass.getAnnotation(DirectAction.class);
    
    	String actionName = actionClass.getSimpleName();
    	if (directActionAnnotation.action() != null && !directActionAnnotation.action().equals("")) {
    		actionName = directActionAnnotation.action();
    	}
    
    	RegisteredAction action = api.addAction(actionClass, actionName);
    	ActionScanner.scanAndRegisterAllKindsOfMethods(registry, api, action);
    }
    Well thats all!... Thanks for your contribution!.
    Bye!.

  3. #103
    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 vlagorce View Post
    It's done
    Vincent,

    First of all, congratulations for the nice work .

    ...

    I am attaching the changes I would like to commit into DirectJNgine in the src.zip file, and some little changes needed in your files to make them work with DJN in the spring_src.zip file. Look for 'PAGULLO' in source files to find the changes.

    Main changes I propose to your files are:

    - SpringRegistryConfigurator.java: I have made it use Scanner, so we do not risk introducing subtle bugs. In fact, the last post by mauro_monti mentions a problem processing annotations that should dissapear if we use Scanner.

    - I think the ActionScanner.java file is not needed anymore.

    - SpringDirectJNgineServlet.java: little changes to avoid having to add a doBeforeDjn initialization method in the base servlet. I am trying really hard to introduce as little changes as possible -I know, I'm *really* picky .


    With respect to the global configuration, I feel uneasy too, but can't think of a better way than yours.

    Now, let me confess that I haven't configured Spring to run the tests, only what's needed to compile: not too much free time nowadays. I think everything will work, but I'm looking forward for feedback from you.

    ...

    Finally, I want to ask you to support using the default configuration, using web.xml, if only to be able to run all the automated tests to ensure we are not breaking things inadvertently. It should be as easy as writing a pair of additional lines to invoke the default processing...

    Additionally, you might want to configure things in Spring so that you can run all automated tests to make sure everything works ok with your extensions. I always run all tests against the latest versions of Firefox, Chrome, IE and Safari before submitting a new release.

    ...

    Again, congratulations .

    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/

  4. #104
    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


    Yup!

    Here are the files...
    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/

  5. #105
    Ext User
    Join Date
    Mar 2009
    Posts
    71
    Vote Rating
    0
    J@y is on a distinguished road

      0  

    Default


    One question, can I separate/allocate different remoting provider for batch ajax request?

    Currently we use:
    Ext.app.REMOTING_API.enableBuffer = 0;
    var remotingProvider = Ext.Direct.addProvider(Ext.app.REMOTING_API);


    is there a way to assign more than one remotingProvider to the Ext.Direct?

  6. #106
    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 Mistake in Scanner.java

    Mistake in Scanner.java


    Vincent,

    I made a mistake in the version of Scanner.java I sent you:

    The correct code is:

    Code:
      private void scanAndRegisterActionClass(RegisteredAction action) {
        assert action != null;
        // ...
    instead of current one:

    Code:
      private void scanAndRegisterActionClass(RegisteredAction action) {
        assert action != null;
          assert !this.registry.hasAction(action.getName()); // REMOVE THIS LINE
          // ...
    My apologies
    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/

  7. #107
    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 J@y View Post
    One question, can I separate/allocate different remoting provider for batch ajax request?

    Currently we use:
    Ext.app.REMOTING_API.enableBuffer = 0;
    var remotingProvider = Ext.Direct.addProvider(Ext.app.REMOTING_API);


    is there a way to assign more than one remotingProvider to the Ext.Direct?
    Jay,

    Unfortunately, what you need to do is register the same Java class with two different action names, because there is no way you can use the same action name in two different providers at the same time *even* if they define different namespaces.

    This is due to the low level protocol used by ExtJs Direct, not related to DJN itself.

    There is a 'workaround': create different ExtJs actions for the same Java class for batched and non-batched work, as in

    Code:
    MyAction.myMethod(...);  // Invoke MyJavaClass.myMethod
    MyActionBatched.myMethod( ... ); // Invoke MyJavaClass.myMethod too!
    I think there is a way: use the new programmatic API in the 1.1 alpha 1 release to register a new DirectJNgine api that will be used to create the 'alternative' provider.

    You can do this by getting the default RegisteredApi DJN will have created for you, and copying the existing actions to a new RegisteredApi, but with a different name.

    Take a look at the manual/example for further info: it sounds like low level stuff, but once you take a look at the example you'll see that it is really easy.

    ...

    As an aside, why do you need some things to be batched and others not? I'm really curious about the use case
    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/

  8. #108
    Ext User
    Join Date
    Mar 2009
    Posts
    71
    Vote Rating
    0
    J@y is on a distinguished road

      0  

    Default


    Thanks pagullo again,

    In one of my panel, it contains several portlets (panel), each panel owns a dataview and store. That means 10 panels will make 10 AJAX requests to the server.

    I'd want to separate these 10 requests into 2 groups, as a result each group has 5 requests.

    Why I'm doing that?
    If I make 10 requests into 1 batch (by setting the buffer size of remotingProvider), all the portlet's results will be held until all 10 requests got the response from server.

    However, I don't want to set the buffersize to 0, which means 10 request will consume 10 individual AJAX requests. It waste a lot of bandwidth (the http header part).

    So this is our scenario.

  9. #109
    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


    I think I get the point...

    It would be nice if Extjs allowed us to specify the maximum batch size. Maybe you should request this feature to the ExtJs guys.

    And, you might implement some "delay" feature that makes sure not too many requests are batched.

    ...

    Now, if only DirectJNgine were capable of returning whatever individual requests it has finished handling after a "prudential time", returning a batch in several parts...

    Maybe when I have more free time: it is not trivial because of multithreaded batched request handling. If somebody is willing to volunteer, I might help with this, though.

    ...

    As an aside...

    I think that sometimes batching per-se is not the problem, but mixing potentially slow methods with fast methods in the same batch is.

    Being that the case, it might make a lot of sense to separate the slow methods in a different Java classes, and register it in a different api => you can use a non-batching provider for slow mehtods.

    Not that this is very elegant, but it might work.

    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. #110
    Ext User
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    0
    vlagorce is on a distinguished road

      0  

    Default


    Hi Djn people

    ==================
    @mauro_monti

    Quote Originally Posted by mauro_monti View Post

    [...]
    I get an IOException saying \dst\Api-debug.js' exists but is a directory...
    Do you know how to solve this problem?...
    [...]
    Strange exception.. The spring code just append text. It did not try to create file..
    In debug mode did you find witch line of code throw it ?

    Quote Originally Posted by mauro_monti View Post
    [...]
    On the other hand, i watched the class SpringRegistryConfiguration. Seems that registry actions, obviating the action paramete of the annotated class. Here is my contribution:

    SpringRegistryConfigurator - Line 49 [...]

    .
    Thank you And as Pedro say it's better to reuse the scanner to register actions.

    ==================
    @pagullo

    Quote Originally Posted by pagullo View Post
    Vincent,

    [...]

    I am attaching the changes I would like to commit into DirectJNgine in the src.zip file, and some little changes needed in your files to make them work with DJN in the spring_src.zip file. Look for 'PAGULLO' in source files to find the changes.

    Main changes I propose to your files are:

    - SpringRegistryConfigurator.java: I have made it use Scanner, so we do not risk introducing subtle bugs. In fact, the last post by mauro_monti mentions a problem processing annotations that should dissapear if we use Scanner.

    - I think the ActionScanner.java file is not needed anymore.
    You'r right, I have also made this modification but don't send it :p.
    The only modification need in Scanner could be the retrieves of the annotation. I'm not sure it's interesting..

    Quote Originally Posted by pagullo View Post
    - SpringDirectJNgineServlet.java: little changes to avoid having to add a doBeforeDjn initialization method in the base servlet. I am trying really hard to introduce as little changes as possible -I know, I'm *really* picky .
    No no.. the less change they have the best it will for everybody I will check it.


    Quote Originally Posted by pagullo View Post
    With respect to the global configuration, I feel uneasy too, but can't think of a better way than yours.

    Now, let me confess that I haven't configured Spring to run the tests, only what's needed to compile: not too much free time nowadays. I think everything will work, but I'm looking forward for feedback from you.

    ...
    I have not too much time too. I must find time in my working time May be in the middle of the next week.

    Quote Originally Posted by pagullo View Post
    Finally, I want to ask you to support using the default configuration, using web.xml, if only to be able to run all the automated tests to ensure we are not breaking things inadvertently. It should be as easy as writing a pair of additional lines to invoke the default processing...

    Additionally, you might want to configure things in Spring so that you can run all automated tests to make sure everything works ok with your extensions. I always run all tests against the latest versions of Firefox, Chrome, IE and Safari before submitting a new release.

    ...

    Again, congratulations .

    Regards
    I will do that as soon as possible !

    Quote Originally Posted by pagullo View Post

    [..]

    Code:
      private void scanAndRegisterActionClass(RegisteredAction action) {
        assert action != null;
          assert !this.registry.hasAction(action.getName()); // REMOVE THIS LINE
          // ...
    My apologies
    ok !


    ==================
    @ ALL

    I have made some change in springConfiguration I will send it after making test for pagullo.

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)
Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi