ArcObjects - IWorkspaceExtension and Component Category Registration - esri

I have coded an implementation of IWorkspaceExtension (along with IWorkspaceExtensionControl, which declares the Init method), and registered it in the ESRI Geodatabase Workspace Extensions Component Category. However, when I connect to the Workspace, the Extension is not "Init"ed.
I was able to get the implementation "Init"ed when I register the IWorkspaceExtension with the Geodatabase, but that is not an option because I cannot install the Extension on all clients, only on the one that will use the functionality.
I hope someone can answer in a couple of minutes what I have been struggling with for a couple of days. =D
Thanks.

Did you register it with IWorkspaceExtensionManager.RegisterExtension?
http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/d50974a4-d67a-4cf0-9041-20cdb9f3a052.htm#GDBReg
Keep in mind that without the DLL, or if the DLL crashes, you will not be able to open the workspace. This wouldn't be a problem if ESRI allowed assemblies to be stored in the geodatabase, the way SQL Server does.

Related

How can I build an Agroal connection at runtime with native support

I'm trying to build a dynamic database connection via Agroal inside a native image. It's not possible to use the default config params because I don't know the connection params at compile time. Is that even possible right now?
The connection is built like this at runtime:
AgroalDataSource.from(
AgroalDataSourceConfigurationSupplier()
...)
I'm currently seeing this error:
Class io.agroal.pool.ConnectionHandler[] is instantiated reflectively but was never registered.
Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
The installed features include: [agroal, cdi, jdbc-h2, jdbc-mysql, jdbc-postgresql, kotlin, narayana-jta, resteasy, resteasy-jackson]
It runs fine on the JVM, but not using Graal. It feels like it should be possible and I'm probably missing something here. I was hoping adding agraol extension would be sufficient but obviously isn't picked up correctly.
The current situation is that we configure Agroal for native images only if you have a datasource defined using Quarkus configuration.
Thus for your use case, for now, you will have to do what we do automatically manually. What we do being registering some classes for reflection and including some resources in the native image.
See https://github.com/quarkusio/quarkus/blob/master/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/AgroalProcessor.java#L91 and https://quarkus.io/guides/writing-native-applications-tips#using-a-configuration-file.
Obviously, that's not ideal. Could you open an issue on our GitHub so that we can discuss it internally and see if we should/can improve the situation?
In the end, you would still need some reflection registration for your JDBC driver though.

BizTalk: How to get all dlls from an application?

I would like to build an external app (console application) which inform me for the DLLs versions that are used in an BizTalk application.
Of course with a quick search I find some examples which are use the Microsoft.BizTalk.ExplorerOM DLL,
but these examples shows only the DLLs that exist in [BizTalk_Local_MgmtDb].[dbo].[bts_assembly] table which when I see them in BizTalk health monitor they have type System.BizTalk:BizTalkAssembly.
I would like also to add in my app (Console application) the DLLs of type System.BizTalk:Assembly which for example can be a helper class which are not listed by Microsoft.BizTalk.ExplorerOM because, I guess, they not exist in [BizTalk_Local_MgmtDb].[dbo].[bts_assembly] table
Have someone any idea how I can achieve what I want?
I found them, these assembles exists in managmentDB in table [BizTalk_Local_MgmtDb].[dbo].[adpl_sat]
So if I understand the question correctly:
You are creating a utility console application, which uses "Microsoft.BizTalk.ExplorerOM". And your "helper class Assembly" is not being listed in your "Console application" because it is not of type "System.BizTalk:BizTalkAssembly".
I'm afraid that you won't be able to do so, as you can't add a class library as "System.BizTalk:BizTalkAssembly". Here is the error we get when try to do so:
You can make try using "System.Reflection".
For your components to be considered as BizTalk Artefacts, your project should be .btproj
Then deploy your components same way you deploy your biztalk applications.

Express-browserify and Watson Visual Recognition - TypeError: fs.existsSync is not a function

I'm trying to get the Watson Visual Recognition to run client side by using express-browserify with reference to the node-sdk for watson-developer-cloud. The VisualRecognitionV3 makes use of the fs package hence I get the fs.existsSync error when I'm trying to call it from the client-side as the browser doesn't know which filesystem to use. My question is how do I go about creating a so called 'abstraction layer' as I am restricted to using the express-browserify package for cross origin calls.
This thread is pretty helpful in shedding some light but I'm not sure where to start regarding the 'abstraction layer' or if there are any other solutions. Also, would something like socket.io work for this? I've linked a clone of the directory here as it seems less clunky than pasting the multiple portions below.
The repository can be cloned and just requires a personal iam_apikey with relevant launch configuration. Appreciate any pointers. Thanks!
I didn't manage to sort this out with express-browserify due to the require(fs) from browser issue but I was able to get it running using the express-ws package

Failure in creation of feature class: Unable to create object class extension COM component

I am working with ArcGIS 10.5, installed on-premise, and are developing our feature class in .NET.
I have an issue with registering feature classes. We have created a Feature Class and registered the DLL through “ESRIRegAsm.exe”, and it appears in ArcCatalog:
Trigger appearing image
But when I try to create the Feature Class, I get the following error:
Failed to create feature class. Unable to create object class extension COM Component
Which isn't very helpful, unfortunately.
The odd thing is, that we have another trigger registered on another Feature Class, that works as expected. And the new trigger is based on a copy of the old trigger's code (with changed GUID's).
The steps I have done so far:
I have tried to add the feature class to the component category using categories.exe.
Registered it using ESRIRegAsm.exe for both Desktop and Engine.
Checked that there are .ecfg config files - and there are.
Checked that the CLSID's appear in the windows registry.
The essential parts of our trigger source-code can be found here: here.
Any help would be greatly appreciated, as we are stuck on this.
Our issue was that our ID's were wrong in the code.
The ClassExtensionCLSID should return the same ID as TriggerExtension has.
Moreover, InstanceCLSID should always return 52353152-891A-11D0-BEC6-00805F7C4268, and should hence not get a new ID.

Is it possible to use regfree COM from registered COM?

I've been trying to implement following scenario:
Application [C++] uses CoCreateInstance on registered COM class (CReg/Reg.dll)
CReg class uses CoCreateInstance on regfree/SxS COM class (CFree/Free.dll).
CoCreateInstance returns REGDB_E_CLASSNOTREG.
Problem doesn't seem to be with manifests, because if I try to instantiate CFree directly via application, object is created with no problem.
I have checked and scenario above triggers Activation Context of CReg (I have checked with sxstrace) and even manifest of the CFree is loaded successfully (!) which should effect in correct regfree COM. If I change manifest of the CFree then Activation Contexts fails (which I believe is proof for me that it was correctly triggered and loaded before the change).
Is scenario with using registered COM [CReg] not possible to access CFree object? If it is possible, are there some special work in order to load it properly?
EDIT
With Joe's help, we worked out that the problem is where Free.dll is located.
Main application is (for example) in C:\Proj\App, both Reg.dll and Free.dll are in C:\Proj\Libs. Is there possibility to load regfree Free.dll which is in different location than application? Problem is that I can't place it in application directory or in application child directory (it has to be in external location).
I have tried to use ISOLATION_AWARE_ENABLED preprocessor definition on Reg.dll project, to trigger Activation context from Reg.dll directory. Manifest from Free.dll is loaded properly (sxstrace logs that) but CoCreateInstance call is still returning REGDB_E_CLASSNOTREG. This blog article points that it may be possible with this definition (but is not giving definite answer on this matter).
Anyone can help me solve this problem or at least point to the documentation that may give me an answer, whether it is possible or not, to load regfree dll from an external location?