Advertisement
Guest User

#SeamForge understands JPA

a guest
Apr 4th, 2011
781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.18 KB | None | 0 0
  1.    ____                          _____                    
  2.   / ___|  ___  __ _ _ __ ___    |  ___|__  _ __ __ _  ___
  3.   \___ \ / _ \/ _` | '_ ` _ \   | |_ / _ \| '__/ _` |/ _ \  \\
  4.    ___) |  __/ (_| | | | | | |  |  _| (_) | | | (_| |  __/  //
  5.   |____/ \___|\__,_|_| |_| |_|  |_|  \___/|_|  \__, |\___|
  6.                                                 |___/      
  7. [forge-distribution] dist $
  8. [forge-distribution] dist $                
  9. [forge-distribution] dist $ new-project --named example --topLevelPackage com.example --projectFolder ~/Desktop/example
  10. Use [/home/lb3/Desktop/example] as project directory? [Y/n] y
  11. Wrote /home/lb3/Desktop/example/src/main/resources/META-INF/forge.xml
  12.  
  13. ***SUCCESS*** Created project [example] in new working directory [/home/lb3/Desktop/example]
  14.  
  15. [example] example $
  16. [example] example $ persistence setup        
  17. [example] example $ persistence setup --provider
  18. HIBERNATE       OPENJPA         ECLIPSE_LINK      
  19. [example] example $ persistence setup --provider HIBERNATE --container
  20. JBOSS_6           GLASSFISH_3       CUSTOM_JDBC       CUSTOM_JTA        CUSTOM_NON_JTA    
  21. [example] example $ persistence setup --provider HIBERNATE --container CUSTOM_JTA --database
  22. MYSQL               ORACLE              DERBY               DB2                 POSTGRES            DEFAULT             DB2_AS400          
  23. DB2_OS390           MYSQL_INNODB        MYSQL_ISAM          ORACLE_9I           ORACLE_10G          SYBASE              SYBASE_ANYWHERE    
  24. SQL_SERVER          SAP_DB              INFORMIX            HSQLDB              INGRES              PROGRESS            MCKOI              
  25. INTERBASE           POINTBASE           FRONTBASE           FIREBIRD            HSQLDB_IN_MEMORY    ORACLE_11G          ACCESS              
  26. [example] example $ persistence setup --provider HIBERNATE --container CUSTOM_JTA --database MYSQL --jndiDataSource jdbc:defaultJTA-ds
  27. Wrote /home/lb3/Desktop/example/src/main/resources/META-INF/persistence.xml
  28. [example] example $
  29. [example] example $ cat /home/lb3/Desktop/example/src/main/resources/META-INF/persistence.xml
  30. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  31. <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  32.     <persistence-unit name="forge-default" transaction-type="JTA">
  33.         <description>Forge Persistence Unit</description>
  34.         <provider>org.hibernate.ejb.HibernatePersistence</provider>
  35.         <jta-data-source>jdbc:defaultJTA-ds</jta-data-source>
  36.         <exclude-unlisted-classes>false</exclude-unlisted-classes>
  37.         <properties>
  38.             <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
  39.             <property name="hibernate.show_sql" value="true"/>
  40.             <property name="hibernate.format_sql" value="true"/>
  41.             <property name="hibernate.transaction.flush_before_completion" value="true"/>
  42.             <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
  43.         </properties>
  44.     </persistence-unit>
  45. </persistence>
  46. [example] example $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement