Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#21186 - [jdk] JavaDB HOME Addition

Attached to Project: Community Packages
Opened by Alper Kanat (T-u-N-i-X) - Monday, 11 October 2010, 09:00 GMT
Last edited by Thomas Dziedzic (tomd123) - Tuesday, 09 November 2010, 18:12 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Thomas Dziedzic (tomd123)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Can we please add /opt/java/db/bin into jdk.profile file?

Also an init script for JavaDB would be nice.. :)
This task depends upon

Closed by  Thomas Dziedzic (tomd123)
Tuesday, 09 November 2010, 18:12 GMT
Reason for closing:  Implemented
Additional comments about closing:  jre-6u22-4
jdk-6u22-4
Comment by Thomas Dziedzic (tomd123) - Tuesday, 19 October 2010, 21:55 GMT
I can certainly see /opt/java/db/bin getting added, but what would an init script include? can you give me an example, or better yet, a file :)
Comment by Alper Kanat (T-u-N-i-X) - Wednesday, 20 October 2010, 06:50 GMT
Getting added? Who added it? In Arch package or in upstream?

An init script would start, restart, stop the JavaDB without having another software that manages it. Some application servers such as Glassfish are able to do it afaik but a standalone option would be nice.

I'll see if I can create an init script and let you know.
Comment by Alper Kanat (T-u-N-i-X) - Sunday, 24 October 2010, 14:59 GMT
Can you please answer my first 3 questions?
Comment by Thomas Dziedzic (tomd123) - Sunday, 24 October 2010, 18:20 GMT
When I said I can see it getting added, I agreed that it should be put into the profile file.
I haven't included it yet because I'm still waiting for the init script.
That probably answers all 3 questions.
Comment by Thomas Dziedzic (tomd123) - Friday, 29 October 2010, 03:30 GMT
Added the db/bin to the profile in pkgrel 3, now only awaiting your init script.
Comment by Alper Kanat (T-u-N-i-X) - Monday, 08 November 2010, 11:49 GMT
Hi Thomas,

I've just created the necessary files for an init script. There are 2 files:

1) derby-network-server.conf -> /etc/conf.d/derby-network-server (stores the setting for logging to /var/log/derby.log)
2) derby-network-server -> /etc/rc.d/derby-network-server (init script)

Any comments are welcomed! :)
Comment by Thomas Dziedzic (tomd123) - Tuesday, 09 November 2010, 02:41 GMT
I tried running your script, and all seems fine (I have nothing to test it against) but the only thing that I have noticed is that there is a derby.log file in the current directory from which I ran "sudo /etc/rc.d/derby-network-server start" which was not expected because it should have been located in /var/log/derby.log and no file was located at /var/log/derby.log
Comment by Alper Kanat (T-u-N-i-X) - Tuesday, 09 November 2010, 06:44 GMT
Hello Thomas,

As I've mentioned in my earlier post, you should place derby-network-server.conf into /etc/conf.d with the name derby-network-server

When the init script finds that file, it will place the log file into /var/log/derby.log
Comment by Alper Kanat (T-u-N-i-X) - Tuesday, 09 November 2010, 06:46 GMT
Btw, you can verify that the derby network server is working by looking at the listening ports:

$ sudo netstat -tapn

You should see java listening to 1527.. If that's the case, derby is working for you :) You can also see it under running daemons and in the output of ps aux

I've tested the script against unnecessary starts and stops despite the server is running or has stopped, so you also test it for yourself.

Thanks!
Comment by Alper Kanat (T-u-N-i-X) - Tuesday, 09 November 2010, 06:49 GMT
Another thing to know. I've renamed the script and configuration files to derby-network-server because derby can also run as an embedded server which you just do it by providing the jar to your project and that you don't need to have an init script for. To clarify what these files do, I just renamed them that way..
Comment by Thomas Dziedzic (tomd123) - Tuesday, 09 November 2010, 18:01 GMT
ok, my problem was that I was installing the .conf to /conf.d not /etc/conf.d
everything seems to be working, so I will include this shortly in pkgver 4

Loading...