go to post Enrico Parisi · Oct 23, 2023 Hi, before using the Java class/method you need to import/create the proxy classes within Caché using ##class(%Net.Remote.Gateway).%ExpressImport() (or method %Import). Have a look to the documentation here: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY... Enrico
go to post Enrico Parisi · Oct 3, 2023 Converting the Base64 stream to a pdf is trivial, extracting and searching text inside a pdf....can be hard to (almost) impossible. Enrico
go to post Enrico Parisi · Oct 3, 2023 When a new task is created in System Management Portal (SMP) there is a field:"Namespace to run task in" The task will run in that namespace, to find what database it corresponds to check the namespace definition. Enrico
go to post Enrico Parisi · Sep 15, 2023 Ciao Pietro, I'm afraid you cannot change FailureTimeout "at the first iteration", however, for the specific case you describe, in the Business Operation you can override the method OnFailureTimeout() and there programmatically change the default behavior when the FailureTimeout has been reached. Something like: /// Override this method to provide custom handling of retry / failure timeout.<p/> /// Set ..Retry=1 to override normal error return and re-evaluate flag properties.<p/> /// Return 0 to skip further (default) FailureTimeout processing, 1 to perform default processing. Method OnFailureTimeout(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent, ByRef pSC As %Status) As %Boolean { If pRequest.severity = "high" { Set ..Retry=1 Quit 0 } Else { Quit 1 } } This is just a simple example, you may want to test/check pSC.... Give it a try and let us know. Ciao, Enrico
go to post Enrico Parisi · Aug 1, 2023 What type of messages? In general, a message is an instance of a persistent class, so "size" is a vague term. Enrico
go to post Enrico Parisi · May 19, 2023 What's the class/type of test.document property? sendstream.OriginalFilename is replaced/modified by the StreamSet() method
go to post Enrico Parisi · May 16, 2023 Why not use the latest jdbc driver version? https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jd...
go to post Enrico Parisi · May 16, 2023 Instead of adding user & password to the url string, can be entered in the SQL GW configuration page and still works. This way the password is masked and not in clear text.
go to post Enrico Parisi · May 16, 2023 Not if you add in SQL GW Connection config ";trustServerCertificate=true" in the URL, as Jeffrey example
go to post Enrico Parisi · May 16, 2023 Wow how did you pin point that down? The second time I called the method/query (like your) I looked at the variables and found that %objlasterror was set, then from terminal: d $system.OBJ.DisplayError() To get properly formatted error message. BTW, what is a "Domain Service Account"? From a JDBC authentication I guess it's just a normal domain account with user/password. Are having the authentication issue with Microsoft JDBC driver only with Domain Service Account or with standard domain user accounts as well? Enrico
go to post Enrico Parisi · May 16, 2023 It's an issue of the jTDS, using the connection the second time and IRIS try to reuse the connection there is an error: ERROR #5023: Remote Gateway Error: java.lang.AbstractMethodError at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833) at com.intersystems.jdbcgateway.JDBCGateway.isValid(JDBCGateway.java:1982) at com.intersystems.jdbcgateway.JDBCGatewayHelper.processMessage(JDBCGatewayHelper.java:642) at com.intersystems.gateway.JavaGateway.getJDBCGatewayMessage(JavaGateway.java:2015) at com.intersystems.gateway.JavaGateway.processMessage(JavaGateway.java:519) at com.intersystems.gateway.JavaGateway.run(JavaGateway.java:458) at com.intersystems.gateway.JavaGateway.run(JavaGateway.java:421) My guess is that for IRIS the connection "is not valid" therefore open a new connection. It's a known issue already reported. If you search for "jTDS AbstractMethodError isValid()" you will find many entries.. Enrico
go to post Enrico Parisi · May 16, 2023 Just tested using "mssql-jdbc-12.2.0.jre8.jar", Java 8 and IRIS: IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT It works fine, the connection is reused correctly. No additional connections are made if I run a query (like your) multiple times from terminal. I'm using IRIS for Windows, you use same version for RedHat, maybe a platform specific bug? What jdbc driver & java are you using? Enrico
go to post Enrico Parisi · May 16, 2023 So, if you run the FindNPI() method multiple times you end up with miltiple connections to SQL Server? I'm curious, what do you get if from terminal you run: ZWrite %JDBCGatewaySet x=##class(osuwmc.CPD.vProviderNPIEns).FindNPI(123)ZWrite %JDBCGatewaySet x=##class(osuwmc.CPD.vProviderNPIEns).FindNPI(123)ZWrite %JDBCGatewaySet x=##class(osuwmc.CPD.vProviderNPIEns).FindNPI(123)ZWrite %JDBCGateway How many connection to SQL Server are there before and after these commands? Enrico
go to post Enrico Parisi · May 16, 2023 In a tag-based CSP page... just use a class and the CSPURL parameter Well, that's a change of the game! 😁 Enrico
go to post Enrico Parisi · May 16, 2023 why would a query against a Linked Table spawn a new connection every time, wouldn't it reuse a connection? AFAIK it should work exactly that way and reuse the existing connection. Evidently in your case it is not reusing the existing connection and create a new connection leaving the old connection "floating". The "kill %JDBCGateway()" suggested by WRX simply force the close connection so you don't have "floting" connections left over. There is probably some peculiar behavior in your code......if it's not a bug in your IRIS version. In fact connections are stored in %JDBCGateway() array, it would be interesting, after disabling the kill, to see the full content of that array before & after using the linked tables a few times. Enrico
go to post Enrico Parisi · May 16, 2023 I know this is old, but recently I found a new way to export/import a package to a global, this may simplify the solution. 1) create a studio project with all the classes that need to me exported. This can be done programmatically, create an instance of %Studio.Project, use AddItem()...etc. 2) Export the project to a global like ^IRIS.Temp("myProjExport"). Open %Studio.Project, export ot global using DeployToGbl() method 3) in target namespace import calling ##class(%Studio.Project).InstallFromGbl() Using ^IRIS.Temp has the advantage of easy/shared access from all namespaces. Enrico
go to post Enrico Parisi · May 10, 2023 In fact, even subclassing %CSP.WebSocket or adding your instance methods class as superclass would not work because all the code you write inside a CSP page run in class methods, so you cannot call an instance method. And this brings back my initial question: What would be the instance (i.e. $this) of the method? None I think, within a CSP page code there is no current instance, the "page" is not instantiated, even when using %CSP.WebSocket as superclass. But...how are you using %CSP.WebSocket?? Something like: <CSP:CLASS SUPER="%CSP.WebSocket"> Or what/how? Enrico
go to post Enrico Parisi · May 10, 2023 Create a new class, say myCSP.WebSocket, that extends %CSP.WebSocket. Add your instance method to myCSP.WebSocket class and use it as superclass of your CSP page(s). Enrico
go to post Enrico Parisi · May 10, 2023 The problem/error is importing the project/code from the global, not importing the global itself. My guess is that the code has been exported in deployed mode without source, so it can be imported only in the same version. If so, you need the source to recompile. Enrico
go to post Enrico Parisi · May 10, 2023 If you are looking for actual call that have been made (and not purged), you can SQL query the table Ens.MessagHeader and look in the columns SourceConfigName and TargetConfigName. The lines down in the production configuration are...well....derived looking/parsing the code and are not fully reliable/accurate depending on how you pass the target parameter to the SendRequestSync/SendRequestAsync methods (if you writhe the code of your Business Hosts). Enrico