]> git.mxchange.org Git - jjobs.git/blob - INSTALL.txt
Continued:
[jjobs.git] / INSTALL.txt
1 Installation instructions:
2 ==========================
3
4 0) Make sure to have Payara 4.1.2.181 installed AND have javax.faces.jar
5    REPLACED with version 2.3.9 (2.4.0 seem to be a little to new) as the WAR
6    project requires JSF 2.3 (not JSF 2.2 what is shipped with Payara).
7    Paraya is currently required as a @NamedCache annotation alongside @Inject
8    is being used to inject the cache into the backing bean.
9
10    The server.log should reveal a line with "Initializing Mojarra 2.3.9". If
11    that is the case, half way is done and you can continue. Hint: "grep" on it!
12
13    A common mistake is to copy the required JARs not to ~/personal_domain/lib/
14    (or where ever your domain's lib path is) as the required JARs varies from
15    EJB/WAR project. The easiest but single-host deployment is to build the EAR
16    project by doing a "ant dist" in THIS project's root directory.
17
18    For the EJB projects, any EJB 3.0/JPA 2.2 container SHOULD work, Payara 4.1
19    has been tested/used by myself.
20
21 1) Create an empty database and setup proper permissions and user account. You
22    should create a separate database and user for each project you are going to
23    run on it for maximum security.
24
25 2) Setup a JDBC pool. This is an example for a MariaDB JDBC driver, a SQLite3
26    database resource works surely differently (other URL, user/password can be
27    anything non-empty). I would recommend SQLite3 for development (up to 1 mio.
28    records with almost no performance drop) and MariaDB/PostreSQL (later not
29    tested by myself) or any other DBMS (including MongoDB) for the "productive"
30    installation as this project only imports from the javax.persistence package
31    and not EclipseLink/Hibernate/DataNucleus specific packages.
32
33 Pool name: JJobsPool
34 Resource type: java.sql.Driver
35 Driver: MariaDB
36 Driver class: org.mariadb.jdbc.Driver
37
38 URL: jdbc:mariadb://localhost/your_database
39 user: your_login
40 password: your_password
41
42 3) Setup a JDBC resource:
43
44 JNDI name: jdbc/jjobs
45 Pool name: JJobsPool
46
47 4) You DO have to copy A LOT JARs from my project's directories, including my
48    custom JARs as they contain the entity classes, custom exceptions, utility
49    classes, event classes/interfaces and many required more. Plus you also
50    need to copy all 3rd-party JARs or else it will end with the all-famous
51    NoClassDefError.
52
53    If you forgot this file to copy and you have copied it now, please restart
54    the Glassfish server so the JAR can be found and loaded.
55
56 5) Setup a JMS connection factory:
57
58 JNDI name: jms/jjobs-queue-factory
59 Resource type: javax.jms.QueueConnectionFactory
60
61 6) Setup JMS message queue:
62
63 JNDI name: jms/jjobs-email-queue
64 Physical destination name: jjobsSendEmail
65 Resource type: javax.jms.Queue
66
67 7) Setup Java Mail session:
68
69 JNDI name: jjobsSmtpSession
70 Mail host: <your-smtp-host>
71 Default user: <your-smtp-login-name>
72 Default sender address: noreply@your-domain.example
73
74 Optional, but more secure/sometimes required advanced properties:
75
76 mail.smtp.host : <hostname> (localhost is default)
77 mail.smtp.password : <email password>
78 mail.smtp.port : <email port>
79 mail.smtp.auth : true
80
81 8) Setup JMS message queue
82
83 JNDI name: jms/jjobs-user-activity-log
84 Physical destination name: jjobsUserActivityLog
85 Resource type: javax.jms.Queue
86
87 9) From the WAR project, copy local_xx_XX.properties-dist to
88    local_de_DE.properties and local_en_US.properties. If for example your
89    application uses product_categories from jproduct-core, you may want to add
90    your custom i18n strings to the local properties files as this doesn't cause
91    any later merge conflicts as they are added to .gitignore file.