XBRL support in BPEL? - bpel

Does BPEL support XBRL standard?
Very few responses on google tells that Oracle DB adapter in BPEL can be used to interact(perform DML operations) with Oracle XML DB by calling stored procedure.
However we have a requirement that the BPEL should interact(perform DML operations) with Oracle XML DB after the extension XBRL has been applied to DB.
Is there any way to deal with it? Can any BPEL adapter be configured? Please let me know on how to configure the same.

Related

Does Jooq integrate with JPA Transactions?

I'm trying to figure out Jooq 3.17 transaction semantics when used in a Spring Boot application that already uses Hibernate. I read the Jooq docs on this: https://www.jooq.org/doc/latest/manual/sql-execution/transaction-management/, and I think these are the relevant portions for me:
There are essentially five ways how you can handle transactions in
Java / SQL:
You can issue vendor-specific COMMIT, ROLLBACK and other statements directly in your database.
You can call JDBC's Connection.commit(), Connection.rollback() and other methods on your JDBC driver, or use the equivalent methods
on your R2DBC driver.
You can use third-party transaction management libraries like Spring TX..
You can use a JTA-compliant Java EE transaction manager from your container.
You use jOOQ's transaction API.
By default, jOOQ ships with the org.jooq.impl.DefaultTransactionProvider, which implements nested transactions using JDBC java.sql.Savepoint. You can, however, implement your own org.jooq.TransactionProvider and supply that to your Configuration to override jOOQ's default behaviour. A simple example implementation using Spring's DataSourceTransactionManager can be seen here:
Does this mean that if I'm using Jooq within a Spring Boot + Hibernate application, I need to implement my own version of the example SpringTransactionProvider? Or am I covered by bullet point 4 - maybe Hibernate provides a JTA-compliant Java EE transaction manager?
Is there Jooq logging I can turn on that will show me when Jooq recognizes transactions starting and stopping? Something along the lines of this: How to log the start and the completion of DB transactions in Hibernate but for Jooq?
Does this mean that if I'm using Jooq within a Spring Boot + Hibernate application, I need to implement my own version of the example SpringTransactionProvider?
Not necessarily. It just means you should provide jOOQ with a transaction aware DataSource of some sort, and not use jOOQ's own transaction API.
Is there Jooq logging I can turn on that will show me when Jooq recognizes transactions starting and stopping?
Unless you use jOOQ's transaction API, jOOQ doesn't really care about your transaction. It just works with your transaction aware JDBC resources, just like when you use JDBC directly. There's no jOOQ magic going on here, and thus, there's no jOOQ transaction logging available, as jOOQ doesn't know anything about such transactions.

JOOQ how generate record without connection to database

What does your approach to generating Records during compilation time look like without connection to the database? I use to maven plugin for that but I still need a connection to the database but I don't have one.
jOOQ offers 4 out of the box solutions to generating code without a connection to a live database, including:
JPADatabase if your meta data source of truth is encoded in JPA annotations
XMLDatabase for XML based meta data
DDLDatabase for DDL script based meta data (e.g. Flyway migrations)
LiquibaseDatabase for liquibase migration based meta data
All of the above meta data sources come with their own set of limitations, including lack of support for some vendor specific stuff, but that might not affect you. In simple cases, especially the DDLDatabase can be really useful to achieve quicker turnarounds when generating code.
If vendor specific functionality is a thing in your application, then the official recommendation is to use testcontainers to set up your schema for jOOQ code generation (and integration testing!).

Which Code generator should be used for SQL Server

I use my liqibase scripts for Jooq code generation. As I learned from the instructions and log, the Dialect is H2.
Is that a problem if the application runs against a SQL Server database afterwards? Does the code generation have to be adjusted or do the metaclasses remain the same?
<plugins>
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
...
<configuration>
<generator>
<name>org.jooq.codegen.JavaGenerator</name>
<database>
<name>org.jooq.meta.extensions.liquibase.LiquibaseDatabase</name>
The LiquibaseDatabase can be used for simple database schemas where it is desirable not to connect to an actual database instance (e.g. for performance reasons) in order to generate code. It's drawbacks are that it's not an actual SQL Server database, but a simulated migration - currently on an in-memory H2 database. This means that some vendor specific functionality may not work as expected.
It is usually better not to use the above utility for more complex schemas with vendor specific features (e.g. stored procedures, etc.). Instead, use the SQLServerDatabase that connects to an actual database instance.
You could still use Liquibase on a testcontainers based SQL Server instance to set up your schema prior to generating jOOQ code, as explained in this blog post here.

Schema migration for Cosmos DB SQL API. Makes sense?

I started working on a Java project where the chosen database was the Azure Cosmos DB SQL API, so reading the SQL API Cosmos DB introduction I understood that that SQL, in this case, is only for query and not for data manipulation(insert, delete).
The question is: Does it make sense to use a schema migration tool like Flyway/Liquibase for this kind of database?
CosmosDb does not have any support for schemas at the database level. It's schema free with an indexing mechanism that allows for efficient querying of arbitrary JSON data. As such, a SQL schema migration tool doesn't make sense in this context and wouldn't work anyways. It's up to your application code to ensure that data is normalized and migrated to new formats if necessary.
Little late to the party but I think this might help: https://github.com/liquibase/liquibase-cosmosdb. It's an extension for Liquibase for Cosmos DB. So, pretty much what you were looking for!

How can I view an Azure CosmosDb using Pycharms or IntelliJ?

I can see loads of drivers, but nothing for DocumentDB.
I did try searching for an appropriate driver, but I found nothing.
My DocumentDb is in Azure, so I have a URL and primary key, but I was unable to see how to connect via Pycharm using the "Data Source from URL" option.
How can I connect my DocumentDb to Pycharm (or IntelliJ) database explorer?
Cosmos DB is not a relational database, and you cannot simply connect to it as such.
It supports several NoSQL protocol variants: DocumentDB (native document store), MongoDB API, Gremlin graph api, and Azure Table API. Not possible to connect via a relational database driver.
If a tool doesn't explicitly support one of the above-mentioned protocols, you simply won't be able to use it, and will need to work with a different tool. And which tool you choose is really up to you (tool recommendation questions are off-topic).
You can connect to CosmosDb from IntelliJ, DataGrip or other JetBrains software using a JDBC driver. JDBC drivers are software components that allow Java applications to interact with dtabases. (I think that JetBrains IDE's are all based on IntelliJ, which is Java software). I think there are probably a few JDBC drivers around that allow connections to a CosmosDb database and run SQL queries.
For a specific connection example you can look at CData who makes a collection of drivers including a JDBC driver that can be used to connect to CosmosDb from any tool that allows their JDBC driver to be used. They have instructions that are located here for using it with IntelliJ. I have been able to use the instructions located there to connect to a CosmosDb instance from JetBrains DataGrip and run queries against the database. I still have some things to work out but it does allow me to create a successful connection and run simple queries.

Resources