Configure datasource type at runtime - quarkus

I have an application that uses a relational database and the database type is selected when the application is installed (between mysql, mariadb, mssql and oracle). The property quarkus.datasource.db-kind can only be defined at compile-time, so I don't really know how to get there without having to compile four copies of the same application. Any suggestion?
I understand why this should not be possible for a native image, but why is not possible even for a JIT artifact?
Marco.

As you have guessed correctly, this has been done to fully optimize the native executable case but it also allows for some optimizations in the JVM case.
For now, that's not something we are willing to change but you could open an enhancement request on our GitHub and see how many votes this gets.

Related

How to migrate btrieve 5.10a Database with magic 5.6 frontend

I have an old MSDOS software realized in magic 5.6 with an btrieve 5.10a database, that should be modernized(completely redone using a modern DB).
For this I would love to just get the table structures and some understanding in the structure of the magic program.
But unfortunately I was not able to find any documentation on magic nor was I able to get the structure with column names from the tables(.btr but no ddf files).
Any idea on how to get a step further?
Not enough rep to comment, so I'm forced to post this as an answer.
If you can't get hold of any info regarding the data structure you might try:
A. Download and install a try-out version of a more recent Pervasive version and see if that enables you to read the data. In (still more or less current) server versions like V11 there is a DDF Builder utility, which does what the name implies. However, this is no automatic process, but relies on your ability to link the data shown in the application to the hex values on disk.
B. Try to find a BUTIL.EXE version that works with 5.x Btrieve files, run BUTIL -RECOVER and see what that gets you. You might get to parse the data with scripting tools this way - I've done it in the past on 6.x files, but nothing as old as you are dealing with.
The main issue here is whether you'll be able to find compatible tools for a version that old. But then again, maybe 6.x tools might just work.

XPage Osgi plug in development

background
I have designed many tools in the past year or so that is designed to help me program for XPages. These tools include primarily helper java classes, extended logging (making use of OpenLogger and my own stuff), and a few other things that I personally feel I cannot work without. It has been discussed with my employer, and we feel that it might be a good idea to start publishing these items to openNTF. Since these tools are made up of about 3 .nsfs, all designed to use the same java code, key javascript classes, css, and even a custom control or two, I would like to consolidate key items into a plug-in that can be installed at the server and client level. I want to do this consolidation before I even think about publishing any of the work I've done so far. It would just be far too much work to maintain, not just for me, but for potential users. I have not really found any information on how to do such a thing in google searches. I also have to make sure that I am able to make use of the ExtLib libraries, openNTF Domino API, and the Notes API.
my questions
How does one best go about designing such plug-ins? Must a designer
use eclipse, or is this it possible to do this directly in the Notes
Designer?
How does a designer best go about keeping a server and client up to date while designing and updating the plug-in code? Is this why GitHub is often used?
Where is the best place to get material to get started in this direction? I sort of feel lost in the woods, knowing I need to head north, but not having a compass for that first step.
Thank you very much for your input.
In my experience, I found that diving into plug-in development is a huge PITA until you get used to it, but it's definitely worth it overall.
As for whether you can use Designer for plugin development: yes, but you will likely eventually want to not do so. I started out by using Designer for this sort of thing for a while, presumably with the same sentiment as you: why bother installing another instance of Eclipse when I'm already sitting in one all day? However, between Designer's age (it's roughly equivalent to, I think, Eclipse 3.4), oddities when it comes to working sets between the "Applications" and "Project Explorer" views, and, in my case, my desire to use a Mac app, I ended up switching.
There are two major starting points: the XSP Starter Kit (http://www.openntf.org/internal/home.nsf/project.xsp?name=XSP%20Starter%20Kit) and Niklas Heidloff's video on setting up Eclipse for XPages development (http://www.openntf.org/main.nsf/blog.xsp?permaLink=NHEF-8RVB5H). The latter mentions the XPages SDK (http://www.openntf.org/internal/home.nsf/project.xsp?name=XPages%20SDK%20for%20Eclipse%20RCP), which is also useful. In my setup, I found the video largely useful, but some aspects either difficult to find (IBM's downloads are shifting sands) or optional (debugging, which will depend on whether or not you're using Eclipse on Windows).
Those resources should generally get you set up. The main thing to worry about when setting up your Eclipse environment will be making sure your Plug-In Execution Environment is properly done. If you're following the SDK setup instructions, that SHOULD get you where you need to be.
The next thing to know about is the way plugins are structured. Each plugin you want to install in Designer or Domino will also be paired with a feature project (a feature can house several plugins), and potentially an update site - the last one is optional if you just want to import the features into an Update Site NSF. That's how I often do my normal plugin development: export the paired feature to a directory and then import the feature into the server's Update Site NSF and then install in Designer from there using Application -> Install. You can also set things up so that you deploy into the server's plugin/feature directories instead of taking the step of installing into an update site if you'd prefer. GitHub doesn't really come into play for this aspect - it's more about sharing/collaborating with your code and also having a remote storage location for your git repositories (which I highly advise).
And as for the "lost in the woods" feeling: yep, you'll have that for a good while. There are lots of moving parts and esoteric concepts to get a hold of all at once. If you mostly follow the above links and then start with some basics from the XSP Starter Kit (which is itself a plugin project that you can pair with a feature) - say, printing text in the Activator class and making an implicit global variable just to make sure it works - that should help get your feet wet.
It's best done in Eclipse. You can debug your code running on the server from there, as well as run it directly from there. The editors are also more up-to-date. You want:
Eclipse for RCP and RAP developers
XPages SDK for Eclipse RCP (from OpenNTF)
XPages Debug Plugin (from OpenNTF - basically allows you to load the plugins to the Domino server dynamically, rather than exporting to an Update Site all the time)
XSP Starter Kit on OpenNTF is a good starting point for a plugin. There are various references to the library id, which has to be unique for your plugin. Basically, references to org.openntf.xsp.starter need changing to whatever you want to call your plugin. You're also best advised to remove what you don't need. I tend to work in a copy of the Starter, remove stuff, build and if there are errors with required classes (Activator.java obviously will be required and some others), then paste them back in from the Starter.
XPages OpenLog Logger is a good cross-reference, that was built from XPages Starter Kit. It's pretty much stripped down and you'll be able to see what had to be changed. A lot of the elements of the XSP Starter Kit correspond to Java classes you'll probably be familiar with from your XPages Java development.
GitHub etc tend to be used as source control, which is useful for working out what's changed from time to time.

Why is my connection to Oracle failing after upgrading to Orbeon Forms 4.4

I have a working instance of Orbeon Forms 4.3, which I setup to connect to Oracle. After upgrading to Orbeon Forms 4.4, connections to Oracle fail with different exceptions depending on the case, for instance:
org.orbeon.oxf.xforms.submission.XFormsSubmissionException
org.orbeon.oxf.common.ValidationException
org.orbeon.oxf.webapp.HttpStatusCodeException
What could be causing this?
Checking the source of the errors
Those exceptions are most likely only the symptom of the real cause. To be sure, change the your log4j.xml and properties-local.xml per the development configuration, reproduce the problem, and check again your orbeon.log. Check if in the log you see now see an java.lang.NoClassDefFoundError: oracle/xdb/XMLType exception.
Solution
If you see that NoClassDefFoundError, you need to add the xdb.jar and xmlparserv2.jar to the directory where you currently have Oracle driver. Those two files are part of the Oracle driver, and come along the other "main jar", i.e. ojdbc6_g.jar. On Tomcat, you typically place those files in Tomcat's lib directory. Restart Tomcat, and your problem should be solved.
Why this is happening
This is happening because Orbeon Forms 4.4 started sending XML "as XML" to Oracle, instead of "as CLOB". Because of this, the driver uses classes from xdb.jar and xmlparserv2.jar. In retrospect, this might not have been the best approach; it was done because it looked like the "right thing", but it isn't clear this has any performance or other benefit, and makes installation and upgrade harder, requiring additional jars.
Update
This issue is fixed in Orbeon Forms 4.5.

Panda3D doesn't take in latest model

i've been really frustrated with Panda3d so far with the importation of models. Panda3d will only import a model once and will never update ever again (even after changing the name of the .egg file)
I first imported a model (let's call it version 1), into VS2010 panda3d. Then i revised the model in 3dsMax and exported it into egg again (version 2). However, no matter how many times i import, panda3d will stubbornly use version 1. Renaming the .egg doesn't help either. Im suspecting that panda3d caching system is caching my previous model and there's something important linking all the versions together, defaulting the panda3d engine to go back to version 1.
The main question is, how do i solve this problem of panda3d not taking in the latest model? Thank you.
I think you will get answers to your questions about Panda3D more quickly if you ask them over on the Panda3D forums.
But to answer your specific question, Panda does indeed incorporate a model cache, which by default reads a particular filename once (during a session) but does not read the disk again during the same session, even if the file changes (but you can explicitly ask it to read the disk again if you need this). Panda also has a persistent disk cache, which by default caches the loading of a model between sessions as well, though in this case it does always check the timestamp of the file before blindly returning the previous model, and if the file is updated, it will always re-read it and return the new version instead.
In neither case will it return a cached version if you completely rename the file, so something else must be going on in that case.
The precise way you disable caching depends on the particular calls you are using to load the model. You reference VS2010, so I infer that you are writing in C++ (but using VS2010 instead of VS2008 isn't officially supported, so you might have other problems as well unless you have far out of your way to use VS2010 correctly).
To avoid the cache for a particular model, try passing a LoaderOptions object with the LF_no_cache bits set in the flags to ModelPool::load_model() (or whichever interface you are using to load models).

Oracle Database to Class Diagram

We are using an oracle database in a project. Most of the tables represents classes or objects in the application. The application currently doesn't have a substantial amount of documentation. I am using StarUML to make up some class diagrams and such for other developers on the project to increase their understanding of the overall project. Using the database tables as a starting guide, and then making modifications to the diagrams as needed would be the absolute easiest and quickest way to get these set up. Is there any free applications that could assist me in pulling the schema out of the Oracle database and create class diagrams from them? Currently, there are 98 "objects" or classes closely modeled in the database and to create these all in a modeling application from scratch would be very time consuming.
You don't say what your target language is.
You can use Hibernate to generate schemas from an object model and mapping.
Middlegen is a tool that can create Java classes from schemas. Maybe those will help.
A 1:1 object-to-table mapping isn't always the best way to do things. It's hardly object-oriented. I'd view it as a starting point only.
I looked (briefly) through the StarUML documentation and don't see any way to import a database definition, so I'm not sure how you do this, sorry.
If you can find a way to get the data into StarURL, you could use Oracle's free SQL Developer tool to get the table definitions out as DDL or XML.
I know that Microsoft's Visio tool (Pro & Enterprise editions) can read selected tables from your Oracle database and generate models from that, but it ain't cheap. I really like Allround Automation's PL/SQL Developer as a reasonably-priced IDE targeted at programmers (vs DBAs) and I know that will generate diagrams locally. But I'm not sure it can save the metadata in a form you could use in StarUML.
Good luck,
-- Stew
It's a shame you didn't bother to respond to replies to your own question. Or am I misunderstanding the standard practice here that people just give points and move on?

Resources