Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Datasource within the project-stages.yml file #49

Open
cmoulliard opened this issue Jan 25, 2017 · 0 comments
Open

Add Datasource within the project-stages.yml file #49

cmoulliard opened this issue Jan 25, 2017 · 0 comments

Comments

@cmoulliard
Copy link

When we use Swarm with JPA/Hibernate, the datasource to be used is defined withn the persistence.xml file.

  <persistence-unit name="cdservice-persistence-unit" transaction-type="JTA">
    <description>Forge Persistence Unit</description>
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>java:jboss/datasources/CatalogDS</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.format_sql" value="true"/>
      <property name="hibernate.transaction.flush_before_completion" value="true"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
    </properties>
  </persistence-unit>

Unfortunately, no info is added within the project-stages.yml file

swarm:
  datasources:
    data-sources:
      CatalogDS:
        driver-name: mysql
        connection-url: jdbc:mysql://localhost:3306/catalogdb
        user-name: mysql
        password: mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant