No announcement yet.
  • Filter
  • Time
Clear All
new posts

  • what is key for MultipleActiveResultSets property in server.proeprties file?

    I need to add vertica property in file.
    the java code is ((VerticaConnection)connection).setProperty("MultipleActiveResultSets",true);
    how to add this property in means what is key for this property?

  • #2
    We don't have special code for setting Vertica-specific properties like this. It may be possible to set this property via a JDBC URL, or to turn it on by default in the database so that nothing needs to be set from Java.


    • #3
      unfortunately this setting need to do at JDBC level, so we can't change in DB.
      I have modified in JDBC url like below :
      but multipleActiveResultSets property is not setting to connection object.
      Note : java code is ((VerticaConnection)connection).setProperty("MultipleActiveResultSets",true);

      please let me know if we have any other alternatives? or other way to set property to connection object.


      • #4
        Vertica's own docs suggest that this can be done via a JDBC URL, as we first suggested.

        Outside of that, there's no current way to do this, since the particular way Vertica wants this called would require Vertical-specific code (the typecast) and we have none.

        We can see a few ways that we could get this done via Feature Sponsorship and Java Reflection, if the JDBC URL doesn't work and you're stuck.


        • #5
          Currently I am doing POC for new project, In worst case move to another technology. This project not in the position to sponsor for this feature.
          as we have spent some man hours for this POC, Still i would like check for alternatives. Can I use new pool factory by modifying any key in


          • #6
            No, setting things in will not introduce new features into Java code.

            Again, the product you are using says it can be configured via a JDBC URL. You should focus on that approach.


            • #7
              I wrote a sample standalone java program by using same vertica driver. I have tested by adding multipleActiveResultSets=true property to jdbc URL and it is working fine. but when I use same URL to smartGwt application then property is not considered. Is samrtGwt not propagating all the properties to connection object? could you please confirm?


              • #8
                When you are using the JDBC URL approach, the url contains key information and we would not be able to connect to the database without it, so of course, we are using the url you provide.

                Check for basics like:
                1. you are possibly not even using JDBC URL approach. You are still using another set of settings
                2. you have a typo in the part of the JDBC URL that is meant to turn on this property


                • #9
                  As I said I have used same JDBC URL, same properties and same DB driver for my standalone program which working smoothly. But the same doesn't work with smartGwt application.
                  Last edited by kots; 8th Aug 2017, 23:06.


                  • #10
                    So if you are in the debugger watching SmartGWT pass the correct JDBC URL to Vertica, what exactly is your theory for what SmartGWT is doing wrong here?

                    And how are you deciding that the feature you're trying to enable is not actually enabled?


                    • #11
                      below are my replies for your questions.
                      1) how are you deciding that the feature you're trying to enable is not actually enabled?
                      when we set this property, resultset will moved to SESSION_MARS_STORE table in vertica DB. If I set from standalone application, the behavior is same as expected but when I set from smartGwt application nothing going to SESSION_MARS_STORE table and query results are directly sent to the client.

                      2) what exactly is your theory for what SmartGWT is doing wrong here?
                      I believe you are expert in smartGwt and need to tell.


                      • #12
                        Ok, it seems we're done here.

                        You agree that SmartGWT is configuring Vertica correctly and Vertica just doesn't work.

                        We don't have expertise in Vertica at this time, so we can't tell you why it's not working - that's up to you.


                        • #13
                          'You agree that SmartGWT is configuring Vertica correctly and Vertica just doesn't work.' I don't agree this. If there is any issue with vertica then It should fail with standalone application too.
                          I strongly feels that some where in smartGwt jars, it is swallowing some properties which are mentioned with JDBC URL. Please just confirm by consulting any developer whether it is swallowing or not.


                          • #14
                            You have already been talking to a developer, and no we do not modify the JDBC URL and strip things off of it (quite a bizarre speculation by the way!). We literally just call getConnection() with the JDBC URL you provided.

                            We don't know what's in your "standalone test". It could fail to mimic what a real system does in terms of JDBC usage in many ways: different SQL, different series of JDBC calls in terms of creating Statements, traversing the ResultSet, etc.

                            Further, turning on this feature appears to be an architectural misstep, since the feature you are looking for would appear to mess up Connections for other callers (since they are pooled, as is typical of all such systems). So it probably does not make sense to do what you are trying to do in the first place.

                            As well, the feature seems to be the rough equivalent of a "select into" from other systems and can quite possibly be achieved by customizing the generation SQL, and we copiously document how to do this (see QuickStart Guide).

                            Further yet, SmartClient allows you to run arbitrary Java logic in order to produce a response from the server (see QuickStart), so if you have your own JDBC logic that you like, you can simply use it, including being able to re-use the SmartClient generated SQL (see SQLDataSource.getSQLClause(), and again, make sure you have read the QuickStart Guide, especially Custom DataSources).

                            Finally, we *also* provide direct access to the Connection object (see this sample) if you prefer to pursue your originally articulated strategy (the one that appears to be an architectural misstep, due to pooling).

                            So we'd suggest that, rather than further speculating that something deep within the SmartGWT .jars is foiling you, you simply get on with your work via the many ways in which our system already makes it possible.