AdminConnection instance when no DB exists yet

0 views
Skip to first unread message

Dale Visser

unread,
Jan 17, 2017, 7:37:26 PM1/17/17
to Stardog
I can't figure out how to establish an AdminConnection to a running Stardog server that has no DBs created on it yet. Right now, I do this hack:

    private static final String STARDOG_SERVER = "http://192.168.59.104:5820/";

...
       
       
ConnectionConfiguration configuration = ConnectionConfiguration.from(
                STARDOG_SERVER
+"dummy").credentials("admin", "admin");
       
try (Connection stardog_connection = configuration.connect()) {
            LOGGER
.info("Connected to Stardog succesfully.");
           
try (AdminConnection admin_connection = stardog_connection.admin()){

where 'dummy' is a DB I created outside of the code, just so I could get a Connection to call .admin() on.

Zachary Whitley

unread,
Jan 17, 2017, 7:42:27 PM1/17/17
to sta...@clarkparsia.com
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Dale Visser

unread,
Jan 18, 2017, 10:14:45 AM1/18/17
to sta...@clarkparsia.com
Thanks!
Reply all
Reply to author
Forward
0 new messages