I am working on collabnet subversion repository. I installed CollabNetSubversionEdge-4.0.6_setup-x86_64 software and I created users in Collabnet GUI to access my repository. And I and my users accessing my repository and everything is working fine.But,
Here my task is Insted of creating users in Collabnet Create users in Data base(MySql or Oracle) and make them to lo-gin from our DataBase to access collabnet
I googled a lot but I didn't get even a single answer for this one.May be this is not possible. If it possible please tell me how to achieve this one.Thank you very much.
Subversion passes off security to its servers. If you use Apache httpd (you don't specify), you can use whatever Apache configurations to do user access. The two most common is LDAP (which can connect to your Windows Active Directory server) and using a text based httpasswd to generate a user password file. I have not seen this with SQL, and I couldn't imagine why you'd want to use something so complex for something so simple -- unless you already store users in a SQL database.
If nothing else, you could have a crontab that would build the svn_access_file via a SQL query that runs it through httpasswd.
There is some information from Oracle on this, but I have never seen it done, and Apache httpd's documentation doesn't have specific directions.
Related
I couldn't find an answer to this question. How can I export a Java project that makes use of a PostgreSQL database?
I want to use the same database on another computer. Do I need to export the database itself with the project? How can this be done?
What should the connection URL be, so that the database is accessible on another computer?
I'm using JDBC, and I'm on Windows.
Thanks in advance.
EDIT: Wouldn't I also need to dynamically retrieve the username and password on the other computer, instead of using the specific username and password I have on my computer in PostgreSQL?
It really depends on what you want to achieve.
Shared database between hosts
Do you want the application on both computers to use the same database, so that changes made by one are seen on the other? If so, you need to configure each copy of the application to connect to the same database instance on one of the machines. This is usually done by changing the JDBC URL. You'll need to configure PostgreSQL on the machine that'll be the database server so it allows connections from the other hosts, ensure they can talk to each other over TCP/IP, etc.
Fresh DB on each host
Do you want each install to have a separate instance of the database, so changes made on one have no effect on the other, and where each instance starts out with a blank, empty database (or one with only static contents like lookup tables)? If so, you should generally define the database using SQL scripts, then have the application run the SQL scripts when first installed on a machine. If you've defined the database by hand so far, you can use pg_dump to create a SQL script that you can use as the basis for this, but I really advise you to look into tools like Liquibase for schema management instead.
"Fork" current state
Do you want each instance of the application on a machine to have an independent database, so changes made on one have no effect on other instances on other machines, but where the starting state of an install is what was in the database on the other host? If so, you need to dump and reload the database alongside the application, using pg_dump -Fc and pg_restore. You can automate this within your application / build system using tools like ProcessBuilder, or do it manually.
There's no generic, canned way to do this. It'll require you to define an application deployment procedure, maybe produce an installer, etc.
I created a java swing application using a MySQL database.
So I want to create an installer for the application so as it could be installed and runned on every pc having JRE installed.
After some researches, I found a way to achieve this using Launch4j and Inno Setup Compiler after generating the jar file.
The problem is that I don't know how to integrate the mysql database so as the application can be seen as a whole.
Thanks in advance
It is more a comment that anything, but I need the extra space/formatting:
A MySQL install is not something I would do automatically for a user because:
a) You are creating services that the user may not know how to manage. You are installing a program that will open ports, that may need security updates, etc. If your final user has no IT background to properly manage that, it is clearly a security issue.
b) Maybe the user prefers another configuration. OTOH, if the user knows what he is doing, maybe he already has a MySQL install. He may prefer just to run your DB inside the MySQL that is already installed, because it is properly configured (including backups), it is in redundant hardware, whatever.
If you need a small, embedded database with your product, switch to Derby or Hypersonic.
If your product requires a full MySQL install, just provide (and document) a way for an IT operator do the installation by itself (give the SQL scripts to create and populate the database together with the code, specify how to configure the DB parameters in your application).
I have a website written in JSF backed by MySQL database running on Tomcat 7. Now there is only one missing part - project first setup/installation. I want my war when deployed for the first time to offer you installation/first time setup with following steps:
Setup database - enter mysql parameters needed to successfully connect to mySQL server.
Write those parameters into some external file for further use (of course encrypted).
Install database - take a file with SQL inside that creates all the tables in database.
Create first user etc.
Delete installation files.
Similar steps are used in PHP Content Management systems like Drupal. I know perfectly how to work with files in Java. I also know, that I can't change content inside a jar once it's deployed and running, so I have to put my files with SQL and database parameters somewhere else.
My questions are
Where can I put these configuration files to make them readable ? And how ?
Is there another way to achieve this goal ? What is commonly used by Java developers ?
Thank you for your answers.
You can use JPA(Java persistent API) and put all this configuration on persistance.xml and set the schema generation to create Table also the things related to role and user is dependent to application server.
JPA use ORM(object relational mapping) to map between you objects (entity) and database tables
i have a java project with mysql database
i am using advance installer to create a setup file...
i can embed jre to run the software(Without installing java in the system).
like wise,i want to embed the mysql database (system doesn't contains mysql )...
.There is any software to embed mysql database in my project setup...
MySQL is very difficult to embed correctly and there are a number of failure states that might occur if it is not shut down using the proper procedure. SQLite is a much better engine for this sort of thing and is used by a number of applications as a persistent backing store. While not as powerful as MySQL, it is much more resilient. It also has the advantage of not requiring a separate process.
SQLite's storage method is to persist things into a file that can be copied, moved, or backed-up without any issues. MySQL involves many such files, some of which are in an inconsistent state unless the correct FLUSH is called.
The best you can do with MySQL is bundle it, not embed it, but then you'll be responsible for setting it up on the host system, configuring it correctly, running the appropriate maintenance procedures, and providing some kind of back-up facility for the database itself.
I'd be grateful to hear of any others who share my problem and, perhaps, have a solution.
I'm using Apache Derby database and it involves using LDAP for my database users.
When I use the 'ij' tool, everything is as it should be. Users can only use the database if both their names and passwords are known to LDAP.
However, when I use the same code in pure Java, users are accepted even though the wrong password is used. That is, names are checked with LDAP but passwords seem to be disregarded.
The Java programs compile and run so there seems to be no problem with the settings for PATH and CLASSPATH.
Any ideas?
Thanks,
Ron Wates.
It is probably because the defaultConnectionMode is fullAccess for everyone. You can set these properties at database level programatically after creating the database and connecting it to the first time. After connecting to the database for the first time You should set all other required properties ex Derby.database.defaultConnectionMode=noAccess Derby.connection.requireAuthentication=true
Derby.database.user , derby.authentication.provider=LDAPand other ldap properties.
These properties will take effect after restarting the db.
See the links provided here in
https://stackoverflow.com/a/9518516/1282907
this is the one you are looking for
http://db.apache.org/derby/docs/10.6/devguide/rdevcsecureclientexample.html