how to use Arangodb for session in asp .net core? - session

How can we use the arango db for session caching in asp .net core applictaion.
do we have any drivers?
like we have for sql --> Microsoft.Extensions.Caching.SqlServer --> AddDistributedSqlServerCache
I need the extension method for arango db, to use session caching.
In startUp file, add the service for session using Arango
Like we for sql
Services.AddDistributedSqlServerCache

Related

NServicebus Saga using Oracle.EntityFrameworkCore

I would like to know if it's possible to use Oracle.EntityFrameworkCore with NServicebus 7.6?
I am using hosted .NET 6 service running NSB 7.6.
Data access are using Oracle.EntityFrameworkCore
From the documentation it looks like you have to use NHibernate or "old" NET 4.x
There's a sample for using Entity Framework Core and like Martin Anderson mentioned, you can use it together with SQL Persistence for Oracle and share the connection. As the documentation mentions:
To maintain consistency, the business data has to reuse the same connection context as NServiceBus persistence. With SQL persistence, this is achieved by using the same ADO.NET connection and transaction objects in both NServiceBus and Entity Framework.

How to read MS Access db(.mdb file) in Spring batch and load into mysql db

I want to read *.mdb file in Spring Batch and load into MySQL database.
There is no support for MS Access database format by default in Spring Batch. The first step is to see how to read data from a MS Access database using Java, then you can create an ItemReader and use it in a Spring Batch job.
Now in order to connect to a MS Access db from Java, you can see the following questions/answers:
Manipulating an Access database from Java without ODBC
How to connect java to Ms access Database
If you manage to create a jdbc DataSource pointing to a MS Access database, you can use the JdbcCursorItemReader (or JdbcPagingItemReader) and configure it with that DataSource (In this case there is no need to create a new reader).
Hope this helps.

MyBatis+Spring+Jersey with Oracle Seems to reuses SQL sessions

I'm creating a rest service using MyBatis 3.3.1, Spring 4.3, Jersey 2.22 and Oracle 12c. My transactions are being managed by Spring using the DataSourceTransactionManager and the #Transaction annotaion. I am also using a MyBatis pooled data source as my javax.sql.DataSource. What I don't understand if why database sessions are being reused.
In my application, I am setting an oracle client identifier: DBMS_SESSION.SET_IDENTIFIER("my id"). With the debug logging statements, I can see MyBatis creating new sessions for each of the MyBatis sql operations. I also have debug to print out the database session identifier from DBMS_SESSION.UNIQUE_SESSION_ID.
What I don't understand is that if I access my rest endpoint multiple times, the unique session id is the same and the identifier from my last access is still set.
Shouldn't a new oracle session be used every time MyBatis gets a new SQLSession? Why is the oracle session always the same?
Thanks.
Session in Oracle is bound to a connection.
You are using connection pooling so after one rest request is finished the connection is returned to the connection pool. Session is not terminated in this case.
You probably want to clear identifier on returning connection to pool and setting it on retrieving connection from the pool. The exact way to do that depends on the connection pool you are using. For built-in mybatis connection pool see this answer.

How to selectively store attributes in Redis when using Spring Session

Using Redis with Spring Session, is there any possibility to "select" which attributes to be stored and updated in Redis and filter out the others?
Something similar to "sessionAttributeFilter" or "sessionAttributeNameFilter" properties. For example, sessionAttributeFilter is used by the memcached session manager for the same purpose.

Accessing Coherence Cache hosted on Weblogic 12c from Java Client

I would like to access and manipulate Coherence Cache configured on a cluster defined with in WebLogic 12c as a GAR via API in an java application.
Though I can get a reference to cache via NamedCache API but am unable to get objects added to it via web logic JSP page.
Any tips will be appreciated
As long as you have the same cluster and cache configuration, all you have to do from your stand-alone Java process is to call into the CacheFactory class and ask for the cache.

Resources