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

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

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

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

To create a custom CSP login page:

  1. Ensure that the Web Gateway user (CSPSystem) has permissions to read the database for where the custom login page is located. Assign the desired database resource to an appropriate role, and then assign that role to the CSPSystem user.

See:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

And...this is the demonstration that the feedback button in the documentation pages really does work!
I admit I ran into this problem sometime ago, after realizing the problem I felt the documentation had to mention that "detail"....so I pressed the feedback button and filed the request/advice.

Now that "detail" is the first step in the recipe of creating a custom login page.

Well done InterSystems Documentation team!

Now we only need to encourage people to actually read the documentation wink

Or search the community:
https://community.intersystems.com/post/custom-login-page-iris

Enrico smiley

Yes, there is, at least "everything" IRIS is aware of, so some item maybe missing but can be added.

In SMP, Iteroperability -> List -> Productions, select the production and click "Export" button.

Or, open production configuration, production settings, actions, Export button.

All production items are selected and you can manually add additional classes/components like search tables, custom schema, deployable system default settings, data transformations, etc.

Then, when you deploy your production you can also create a rollback file, in case you want to rollback, see:

https://docs.intersystems.com/irisforhealth20222/csp/docbook/DocBook.UI....

Enrico

Personally I'd rather use a default numeric ID and if needed an additional UUID/GUID unique property.

To implement what you asked you can use something like:

Class My.TestClass Extends %Persistent
{
Property PrimaryUUID As %String [ InitialExpression = {$system.Util.CreateGUID()} ];
Property MyOtherData As %String;

Index PrimaryUUIDIndex On PrimaryUUID [ IdKey, Unique ];
}

In this way the primary key (PrimaryUUID) is automatically assigned, no need to set it manually, in SQL is mapped as ID (as well as PrimaryUUID).

Enrico

I would  send the message to a Business Operation and set state as deferred, then "later" (when? what trigger? from where?) using some logic, choose the message(es) and send response to that BO from somewhere (Business Service? Any other Business Host? ...to little info to know) to continue the process.

Not enough info to elaborate it further.

Enrico