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. #471
    Sencha Premium Member
    Join Date
    Jul 2007
    Location
    Sydney, Australia
    Posts
    175
    Vote Rating
    6
    seade is on a distinguished road

      0  

    Default Patch to get 2.2 src to compile

    Patch to get 2.2 src to compile


    In order to get the 2.2 source to compile I needed to apply the following patch:
    Code:
    diff -u -r Downloads/directjngine.2.2/src/prod/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java ./src/prod/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java
    --- Downloads/directjngine.2.2/src/prod/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java    2012-05-20 19:34:52.000000000 +1000
    +++ ./src/prod/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java    2013-10-03 14:00:26.000000000 +1000
    @@ -73,7 +73,7 @@
         return new Adapter<T>(constructor, getBoundFields(gson, type, raw));
       }
     
    -  private ReflectiveTypeAdapterFactory.BoundField createBoundField(
    +  private static ReflectiveTypeAdapterFactory.BoundField createBoundField(
           final Gson context, final Field field, final String name,
           final TypeToken<?> fieldType, boolean serialize, boolean deserialize) {
         final boolean isPrimitive = Primitives.isPrimitive(fieldType.getRawType());
    HTH. Scott

  2. #472
    Sencha Premium Member
    Join Date
    Jul 2007
    Location
    Sydney, Australia
    Posts
    175
    Vote Rating
    6
    seade is on a distinguished road

      0  

    Default Patch to allow 2.2 api to be loaded into Sencha Architect 3.0

    Patch to allow 2.2 api to be loaded into Sencha Architect 3.0


    Here is a patch to allow the DJN generated api to be loaded as a Direct Resource in Sencha Architect 3.0.

    In the patch the fact that SA3 is to be used is hardcoded.

    pagullo: It would be great if you could apply this. It would be awesome if you could spend a few more minutes and cater for a further configuration parameter in web.xml to provide a means of indicating that SA is in use.

    Code:
    diff -u -r /Users/seade/Downloads/directjngine.2.2/src/prod/com/softwarementors/extjs/djn/jscodegen/ApiCodeGenerator.java ./src/prod/com/softwarementors/extjs/djn/jscodegen/ApiCodeGenerator.java
    --- /Users/seade/Downloads/directjngine.2.2/src/prod/com/softwarementors/extjs/djn/jscodegen/ApiCodeGenerator.java    2012-07-03 10:57:04.000000000 +1000
    +++ ./src/prod/com/softwarementors/extjs/djn/jscodegen/ApiCodeGenerator.java    2013-11-14 11:24:32.000000000 +1100
    @@ -44,6 +44,10 @@
       @NonNull private RegisteredApi api;
       @NonNull private GlobalConfiguration globalConfiguration;
       
    +  /** Allow for changes to output to allow the generated api to be consumed by SA3  */
    +  // TODO Retrieve this from web.xml
    +  private static final boolean SA3 = true;
    +
       public ApiCodeGenerator( GlobalConfiguration globalConfiguration, RegisteredApi api ) {
         assert globalConfiguration != null;
         assert api != null;
    @@ -70,8 +74,15 @@
           result.append( " **********************************************************************/\n");
           result.append( "\n");
         }
    -    appendNamespaceAndProviderUrlSection(result);
    -    appendPollingUrlsSection(result, minify);
    +
    +    // Sencha Architect 3.0 customisation
    +    if (!SA3) {
    +      // SA3 does not like the namespace and provider URL sections to be specified within the file.
    +      appendNamespaceAndProviderUrlSection(result);
    +      // SA3 does not like this approach to including polling URLs
    +      // TODO Figure out what SA3 does like
    +      appendPollingUrlsSection(result, minify);
    +    }
         appendActionsSection(result, minify);
       }
     
    @@ -159,11 +170,31 @@
         assert result != null;
         
         result.append( this.api.getApiNamespace() ); result.append( ".REMOTING_API"); result.append( " = {\n" );
    +
    +    result.append("  url: ");
    +    if (SA3) {
    +      // By using a relative URL we can skip the base URL
    +      // SA3 also requires the URL to be quoted, perhaps this is acceptable for non-SA3 use as well?
    +      result.append( "'" ).append( this.globalConfiguration.getProvidersUrl() ).append( "'" );
    +    }
    +    else {
    +      // The following code depends on appendNamespaceAndProviderUrlSection() which is not invoked for SA3
    +      result.append( this.api.getApiNamespace() ); result.append( ".PROVIDER_BASE_URL") ;
    +    }
    +    result.append( ",\n" );
         
    -    result.append("  url: " ); result.append( this.api.getApiNamespace() ); result.append( ".PROVIDER_BASE_URL") ; result.append( ",\n" );
         result.append("  type: '" ); result.append( REMOTING_TYPE ); result.append( "',\n" );
         if( !this.api.getActionsNamespace().equals("")) {
    -      result.append( "  namespace: " ); result.append( this.api.getActionsNamespace()); result.append( ",\n");
    +        // SA3 requires the namespace to be quoted, perhaps this is acceptable for non-SA3 use as well?
    +        result.append( "  namespace: " );
    +        if (SA3) {
    +            result.append( "'" );
    +        }
    +        result.append( this.api.getActionsNamespace());
    +        if (SA3) {
    +            result.append( "'" );
    +        }
    +        result.append( ",\n");
         }
         result.append("  actions: {\n" );
       }
    Thanks, Scott

  3. #473
    Sencha User
    Join Date
    Feb 2009
    Posts
    1
    Vote Rating
    0
    alper is on a distinguished road

      0  

    Default Multithreaded DirectJNgine context issue

    Multithreaded DirectJNgine context issue


    Hi Guys,

    We are using DirectJNgine for a year and so and no issues so far. Our project is both Ext JS and Angular JS based, so we do JSON-RPC through the DirectJNgine with the same success. Recently we tried to switch on the multithreading, but part of our code didn't work with it. In our web.xml config file we have entries like

    Code:
     <env-entry>
        <env-entry-name>SESSION_TIMEOUT</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>60</env-entry-value>
      </env-entry>
    Then we read these config values with code like this below

    Code:
    private static Object getConfigValue(String keyName) throws NamingException { 
            InitialContext initCtx = new InitialContext();
            try {
                return initCtx.lookup("java:comp/env/" + keyName);              
            }catch(NamingException nex) {
                ...
            }
        }
    This does not work as we guess the context of the newly started thread is not the same. Is it possible to pass the initial context to the newly created threads?

    Thanks,
    Alper

  4. #474
    Sencha Premium Member
    Join Date
    Sep 2013
    Posts
    1
    Vote Rating
    0
    alin@sonatype.com is on a distinguished road

      0  

    Default Upgrade commons-fileupload to 1.3.1

    Upgrade commons-fileupload to 1.3.1


    Hi guys,

    Any plan to upgrade commons-fileupload to latest version, 1.3.1?
    Version 1.3 and 1.3.1 has some important security fixes: http://commons.apache.org/proper/com...rt.html#a1.3.1

    The changes are small to get it working with din, just implement the two new methods in DiskFileItem2. Did that locally and everything seems to work just fine.

    Thanx,
    Alin

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