Orientdb open plocal database in studio - orientdb

How can I have orientdb running in embedded mode in a spring boot server and have studio available as to interact with the database and perform ad-hoc-queries
in the data generated by the app.

You have two ways of using an embedded db:
just open it from the physical path, using ODatabaseDocumentTx
new ODatabaseDocumentTx("plocal:/the/path/to/the/db")
This will just open the db, with no additional services
starting a full OrientDB server inside your application, see http://orientdb.com/docs/2.2.x/Embedded-Server.html for v 2.2
This second option will also start an HTTP server and will expose Studio

Related

How to create and populate the wso2 db tables when using docker-compose?

I'm trying to create a test deployment of the wso2 products using docker-compose, starting with the API manager. I'm using the Dockerfile https://hub.docker.com/r/wso2/wso2am. I have configured my master datasource to point to a PostgreSQL server that is managed by docker-compose.
I have an initial script that is run in the pgsql container that creates the database and db user.
I dont know how to get the wso2 API Manager to create and populate the tables. The wso2 documentation say to use the "-DSETUP" when running the product but I dont have a access to this.
Does anyone know how to do this? Or so I need to build and configure my own Docker images?
-DSetup is now deprecated and it is not available in the latest product releases. Please check the docker-compose resources of WSO2 API Manager in [1].
In this docker-compose example, it has used Mysql and Mysql supports giving sql files for database creation when starting the container. I guess in Postgresql, you can do the same. Otherwise, need to automate the database table creation.
[1] - https://github.com/wso2/docker-apim/tree/v3.0.0.1/docker-compose/apim-with-analytics

.NET Core Entity Framework on AWS

I've got a web application written in .NET Core using Entity Framework to connect to a SQL Server database. Everything works fine locally. The staging/production environment for the app is AWS Elastic Beanstalk, and I seem to be stuck on how to get the app to connect to the database there.
I've created an RDS (SQL Server) database underneath the Elastic Beanstalk app.
Connection string:
user id=[USER];password=[PASSWORD];Data Source=[SERVER].rds.amazonaws.com:1433;Initial Catalog=Development
Creating the DbContext:
services.AddDbContext<MyDbContext>(o =>
o.UseSqlServer(Configuration["Db:ConnectionString"]));
App fails to start, based on the following line in Startup.cs:
dbContext.Database.EnsureCreated();
You have to troubleshoot step by step as below procedure:
Db Connection string is working or not? Better to use with other app and simple doing the Db Connection testing. It could be possible that firewall block your port 1433.
As per your codes, .NET Core Framework will crate a database by code first approach. So that, you have to make sure, your IIS Application Pool user account has write access to SQL Database. Most probability it could be your problem.

How do you configure jndi Glassfish 4 connection to a mongoDB database

I am developing a Jee7 project and would like to employ mongoDB as the backend database.
My jee7 application will run on Glassfish 4.
I wish to use the Glassfish 4 admin console to configure my mongoDB jdbc connection pool etc..
However Glassfish 4 doesn't list mongoDB in its list of supported Database Driver Vendor
Does this mean that you do not configure mongoDB in the same way as say DB2 or MySQL?
I could configure mongoDB using a EJB singleton, but that doesn't feel correct.
I don't think you can without writing your own resource adapter. First, mongodb is non-transactionable, so it's not like it needs to participate in any transaction related events. Second, their java driver manages the connection with their own internal connection pool.
Although it would be nice to configure the resource outside of the app, in reality you should just create a singleton bean and do everything from there.
Also take a look at producers.

OrientDB Studio - trying to get to first base

OrientDB Studio looked to be a promising tool to explore the product for use as an object store replacement for db4o, but I unfortunately I have not been able to get to first base with it.
I am running OSX 10.6.8. The behavior described below was observed with both the 1.7.10 Mac and the 1.7.9 "all platforms" binaries:
1) I am not able to create a database with Studio. I edited the root password and restarted the server but any attempt to create a new database using Studio yields the same result: 401 Unauthorized.
And there is not much information in the logs:
2014-11-20 12:12:32:420 CONF Remote client connected from: OClientConnection [id=1, source=?, since=1416503552420] [OClientConnectionManager]
2014-11-20 12:12:32:431 FINE [ONetworkProtocolHttpAbstract.execute] Requested: POST /database/invoices/local/document [ONetworkProtocolHttpDb]
2014-11-20 12:12:32:438 FINE Disconnecting connection with id=1 [OClientConnectionManager]
2014-11-20 12:12:32:438 FINE Disconnected connection with id=1, no other active channels found [OClientConnectionManager]
2014-11-20 12:12:32:438 FINE Connection shutdowned [ONetworkProtocolHttpDb]
I had to resort to creating the new database using the console. Having to resort to using the console steepens the learning curve and is a barrier to adoption.
2) I would like to use Studio to create indexes and explore index behavior, but I do not seem to be able to open any database, even the demo GratefulDeadConcerts, as writer or admin.
Studio displays the mode (reader) at the top right of the page, and I have to believe I have no write privileges because I am not able to create any indexes on my new object database.
Any help would be Gratefully (pun intended) appreciated.
The problem is apparently not with either OrientDB or Studio.
1) I continued to test with OSX 1.7.10. Logging in as admin/admin, I noticed that Safari would open the databases as (admin) but Firefox would open the databases as (reader). After upgrading to Firefox 33.1.1 the mode now shows as (admin) and I am now able to create databases using Studio.
I just deleted localhost cookies in Safari 5.1.10 and was able to create a database using that browser as well. It's possible that step may required after changing the root password and restarting the server.
2) My problem with index creation was due to lack of understanding of how indexes work. Indexes can only be created on objects with schema-defined properties.
After opening the database and requesting schema generation using the API, Studio displayed class properties and I was able to create indexes on those properties in Studio.
db2 = new OObjectDatabaseTx("remote:localhost/invoices").open("admin", "admin");
// Tell OrientDB to automatically generate schema during class registration, this saves us some code.
db2.setAutomaticSchemaGeneration(true);
// Now register our classes...
db.getEntityManager().registerEntityClasses("your.entity.package.goes.here");
// Save the schema of our new database...
db2.getMetadata().getSchema().save();

IBM Worklight 6.2 Server Deployement error: DB2 Instance not found on server

Environment:
IBM Worklight 6.2,
IBM Liberty 8.5.5.1,
IBM DB2 10.5 &
Windows 2008 standard Edition.
For the High Availability of DB instance[WLDBINST], the following Architecture I have followed.
2 Windows Clustered Machines with IBM DB2 binary and SAN storage used to share the Database file in Common.
If any 1 node is not available the other node will take over the control without any loss of the data.
I have tested the DB2 instance via Cluster IP and it works fine.
The below error has been logged, when I run the Worklight Server Configuration tool,
Instance WLDBINST not found on server. Found only [WLDBINST C, :, DB2CLUSTER, DB2]
I have found the reason for the above issue. To list the DB2 Instances we can use the command db2ilist
C:\>db2ilist
WLDBINST C : DB2CLUSTER
DB2
Above result shows that we have two instances
WLDBINST which is in "C" drive and part of DB2CLUSTER &
DB2
Worklight Configuration tool also uses the similar DB2 tool to list the instances, I guess.
So the configuration tool considering the result as 4 instances as follows,
WLDBINST C,
:,
DB2CLUSTER and
DB2
How I can resolve this issue.
If the Server Configuration Tool is not able to create the database for your topology, you should create it manually before running the tool.
For the Administration database, the doc is here:
https://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.installconfig.doc/admin/t_creating_the_db2_database_for_wladmin.html
For the Project Runtime databases, the doc is here:
https://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.deploy.doc/admin/t_creating_the_db2_databases.html
The server configuration tool will not do any specific configuration to ensure that Liberty reopens a connection if there is a database node switch. I recommend that you review the behavior of Liberty in this case, and add settings in the server.xml as required.