Posts

Posts mit dem Label "JavaEE" werden angezeigt.

Spring Framework on OpenShift: persistence.xml and EntityManager Configuration on Wildfly 10 and MySQL

Bild
Running an Web Application with Spring Framework 4.2.x with Spring-Data-JPA and MySQL on OpenShift the RedHat Cloud is good with Wildfly10. But how to configure the MySQL Database for Spring-Data-JPA? Spring-Data-JPA with Wildfly10 and MySQL on Openshift   First Step: edit persistence.xml. Here is an Example: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="mySimpleWorkListPU" transaction-type="JTA"><jta-data-source>java:jboss/datasources/MySQLDS</jta-data-source> <class>org.woehlke.simpleworklist.entities.ActionItem</class> <class>org.woehlke.simpleworklist.entities.Category...

MySQL DataSource for Wildfly10 like Openshift

how to configure Wildfly10 to have a DataSource for MySQL like Openshift the RedHat Cloud. I installed Wildfly10 on ~/srv/wildfly-10.0.0.Final Step 1: Add MySQL Driver to modules: Download the mysql-driver mysql-connector-java-5.1.38.jar from any Maven Repository e.g.:  http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.38/ go to WildFly modules Directory: cd wildfly-10.0.0.Final/modules/system/layers/base mkdir -p mysql/mysql-connector-java/main copy  mysql-driver mysql-connector-java-5.1.38.jar here. add a file module.xml with content: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1"          name="mysql.mysql-connector-java">     <resources>         <resource-root path="mysql-connector-java-5.1.38.jar"/>         <!-- Insert resources here --> ...

Cool: Installing JBossAS from inside the IDE

Bild
I've installed the JBoss IDE with JBoss Central into the Spring STS 2.9.1 based on Eclipse: To start with a Java EE 6 Web Profile Project, the IDE for itself downloads and configures the JBossAS 7.1 JEE Application Server. This is really cool and very nice to have. Downloading and installing JBossAS 7.1 from the IDE Coexistence: JBoss IDE and Spring STS Coexistence:  JBossAS 7.1 and VMware vFabric tc Server Project Setup based upon Maven3 The Project is a sample, deployable Maven 3 project to help you get your foot in the door developing with Java EE 6 on JBoss AS 7 or EAP 6.  This project is setup to allow you to create a compliant Java EE 6 application  using JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0 and Bean Validation 1.0. It includes a persistence unit and some sample persistence and transaction code to help  you get your feet wet with database access in enterprise Java.