Start server within java-application???

View: New views
4 Messages — Rating Filter:   Alert me  

Start server within java-application???

by Hardie82 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hallo,

I want to start derby in servermode within a java-application. Is this possible? I didn't find a thing in the documentation but start the server via console-statements.

Greetings

Re: Start server within java-application???

by Kristian Waagan-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hardie82 wrote:
> Hallo,
>
> I want to start derby in servermode within a java-application. Is this
> possible? I didn't find a thing in the documentation but start the server
> via console-statements.
>  

Hello,

You have two options;
 - set a system property before you load the embedded driver
 - start the server programmatically

In both cases you need derby.jar and derbynet.jar on the classpath.
More information in [1] under "Derby in a server framework" and then
"Embedded servers".


Hope this helps,
--
Kristian


[1]
http://db.apache.org/derby/docs/dev/adminguide/adminguide-single.html#cadminov17524

> Greetings
>  


Re: Start server within java-application???

by Bernt M. Johnsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>>>>>>>>>> Hardie82 wrote (2009-11-04 00:32:58):
>
> Hallo,
>
> I want to start derby in servermode within a java-application. Is this
> possible? I didn't find a thing in the documentation but start the server
> via console-statements.

Juse the NetworkServerControl API:

http://db.apache.org/derby/javadoc/publishedapi/jdbc4/org/apache/derby/drda/NetworkServerControl.html

--
Bernt Marius Johnsen, Staff Engineer
Database Technology Group, Sun Microsystems, Trondheim, Norway


signature.asc (196 bytes) Download Attachment

Re: Start server within java-application???

by Hardie82 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your help. I tried it and it runs. Very nice :)

Bernt M. Johnsen wrote:
>>>>>>>>>>>> Hardie82 wrote (2009-11-04 00:32:58):
>
> Hallo,
>
> I want to start derby in servermode within a java-application. Is this
> possible? I didn't find a thing in the documentation but start the server
> via console-statements.

Juse the NetworkServerControl API:

http://db.apache.org/derby/javadoc/publishedapi/jdbc4/org/apache/derby/drda/NetworkServerControl.html

--
Bernt Marius Johnsen, Staff Engineer
Database Technology Group, Sun Microsystems, Trondheim, Norway