Assignment for the 2019 edition of the "Web Development and the Semantic Web" course, developed by:
- Alexandre
- Gustavo Ludovico Guidoni
Instructions on how to deploy from scratch are listed below. If you need detailed instructions on how to set up Eclipse, WildFly and MySQL, please refer to this tutorial at JButler's wiki.
-
make sure java 8 or higher is installed. At the command prompt type 'java -jar';
-
Install WildFly 17.x or higher and create a Server configuration within Eclipse;
-
Install MySQL and create a schema called
ros
and a user calleddwws
with passworddwws
and full access to theros
database; -
Configure the MySQL JDBC driver in WildFly;
-
Configure the datasource in WildFly's
standalone.xml
file;
6.1 Database Access:
<datasource jta="true"
jndi-name="java:jboss/datasources/RationalOntology"
pool-name="RationalOntologyPool" enabled="true"
use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/ros?serverTimezone=UTC</connection-url>
<driver>mysql</driver>
<security>
<user-name>dwws</user-name>
<password>dwws</password>
</security>
</datasource>
6.2 Object Access Permissions:
Altere de: <default-missing-method-permissions-deny-access value="true"/>
para : <default-missing-method-permissions-deny-access value="false"/>
6.3 JAAS Configuration (Authentication and Authorization)
search for <security-domains> in <subsystem xmlns="urn:jboss:domain:security:x.x"> tag (x.x is the version), and add:
<security-domain name="RationalOntology">
<authentication>
<login-module code="Database" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/RationalOntology"/>
<module-option name="principalsQuery" value="select password from user where email=?"/>
<module-option name="rolesQuery" value="select 'SysAdmin', 'Roles' from user where email=?"/>
<module-option name="hashAlgorithm" value="MD5"/>
<module-option name="hashEncoding" value="base64"/>
<module-option name="hashUserPassword" value="true"/>
</login-module>
</authentication>
</security-domain>
-
In Eclipse, use File > Import > Git > Projects from Git to import the Eclipse project existing in this repository;
-
You might have to adjust the server settings in the imported project: right-click the rationalontology project and select Properties. In the Server section, select the WildFly 17.x server. In the Targeted Runtimes section, select the WildFly 17.x Runtime;
-
All interfaces were developed without using JButler CrudControlle;
-
All interfaces filter by the logged in user;
-
There are examples of how to implement
join
,exists
,in
,equal
,notEqual
, andsubQuery
throughCriteriaBuilder
queries; -
Sending email through GMail's server;
-
Sends a
form
to the printer; -
To see the queries that MySql performs:
6.1 With the root user, type the command SET GLOBAL general_log = 'ON'
;
6.2 Search for the MySql DESKTOP-7GMHQFV.log
log file (this file name may change depending on the version installed). It is usualy in C:\ProgramData\MySQL\MySQL Server 8.0\Data\
6.3 After checking the query, disable logging using the SET GLOBAL general_log = 'OFF'
command.
NOTE: Viewing queries executed by the server consumes relevant database resources in addition to the size of this file grows quickly. So, remember to disable it.