Assignment for a fourth year CS Course (CSci 483 - Interactive Programming in Java)
- JDK 11
- NetBeans IDE
- Payara Server (Installed using NetBeans IDE)
- MongoDB Community Server
To be able to connect this JSF project to the Mongo Database, you will need the Maven MongoDB Java Driver added to the pom.xml file.
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.12.3</version>
</dependency>
</dependencies>
To be able to share the local Mongo database to another system, you will need to run the following commands:
To dump database to output directory
$ mongod --dbpath ~/data/db
$ mongodump --db DatabaseName -o ./DirectoryName
After copying that directory to another machine
$ mongod --dbpath ~/data/db
$ mongorestore --db DBName ./DirectoryName
Note: If macOS prevents either of
mongod
,mongodump
, ormongorestore
follow the steps below:
- Open System Preferences
- Select the Security and Privacy pane.
- Under the General tab, click the button to the right of the message about mongo, labelled either Open Anyway or Allow Anyway depending on your version of macOS.
Before the project is run, the MongoDB primary daemon process needs to be started using the command (assuming you have set your data directory in the root folder ~
.)
$ mongod --dbpath ~/data/db
This project can be opened in NetBeans IDE and can be easily run there.
To be later added as more features are implemented