Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.67 KB | None | 0 0
  1. NetBeansProjects/EntAppWeb/
  2. ├── build.xml
  3. ├── EntAppWeb-ejb
  4. │   ├── build.xml
  5. │   ├── nbproject
  6. │   │   ├── ant-deploy.xml
  7. │   │   ├── build-impl.xml
  8. │   │   ├── genfiles.properties
  9. │   │   ├── private
  10. │   │   │   ├── private.properties
  11. │   │   │   └── private.xml
  12. │   │   ├── project.properties
  13. │   │   └── project.xml
  14. │   └── src
  15. │   └── conf
  16. │   └── MANIFEST.MF
  17. ├── EntAppWeb-war
  18. │   ├── build.xml
  19. │   ├── nbproject
  20. │   │   ├── ant-deploy.xml
  21. │   │   ├── build-impl.xml
  22. │   │   ├── genfiles.properties
  23. │   │   ├── private
  24. │   │   │   ├── private.properties
  25. │   │   │   └── private.xml
  26. │   │   ├── project.properties
  27. │   │   └── project.xml
  28. │   ├── setup
  29. │   │   └── glassfish-resources.xml
  30. │   ├── src
  31. │   │   ├── conf
  32. │   │   │   ├── MANIFEST.MF
  33. │   │   │   └── persistence.xml
  34. │   │   └── java
  35. │   │   └── dur
  36. │   │   ├── beans
  37. │   │   │   ├── NextClient.java
  38. │   │   │   └── NextClientLocal.java
  39. │   │   └── jpa
  40. │   │   ├── AbstractFacade.java
  41. │   │   ├── ClientFacade.java
  42. │   │   ├── ClientFacadeLocal.java
  43. │   │   ├── Client.java
  44. │   │   └── exceptions
  45. │   │   ├── IllegalOrphanException.java
  46. │   │   ├── NonexistentEntityException.java
  47. │   │   ├── PreexistingEntityException.java
  48. │   │   └── RollbackFailureException.java
  49. │   └── web
  50. │   ├── eagle.xhtml
  51. │   ├── falcon.xhtml
  52. │   ├── index.xhtml
  53. │   ├── menu.xhtml
  54. │   ├── next.xhtml
  55. │   ├── parrot.xhtml
  56. │   ├── template.xhtml
  57. │   └── WEB-INF
  58. │   └── web.xml
  59. ├── LICENSE
  60. ├── nbproject
  61. │   ├── ant-deploy.xml
  62. │   ├── build-impl.xml
  63. │   ├── genfiles.properties
  64. │   ├── private
  65. │   │   ├── private.properties
  66. │   │   └── private.xml
  67. │   ├── project.properties
  68. │   └── project.xml
  69. ├── README.md
  70. └── src
  71. └── conf
  72. └── MANIFEST.MF
  73.  
  74. package dur.beans;
  75.  
  76. import dur.jpa.Client;
  77. import dur.jpa.ClientFacadeLocal;
  78. import javax.ejb.EJB;
  79. import javax.enterprise.context.ApplicationScoped;
  80. import javax.inject.Named;
  81.  
  82. @Named("nextClient")
  83. @ApplicationScoped
  84. public class NextClient implements NextClientLocal {
  85.  
  86. @EJB
  87. private ClientFacadeLocal clientFacade;
  88. private int next = 1009;
  89.  
  90. @Override
  91. public String getNext() {
  92. next++;
  93. Client client = clientFacade.find(next);
  94. return client.toString();
  95. }
  96.  
  97. }
  98.  
  99. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  100. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  101. <html xmlns="http://www.w3.org/1999/xhtml"
  102. xmlns:ui="http://java.sun.com/jsf/facelets"
  103. xmlns:h="http://java.sun.com/jsf/html"
  104. xmlns:f="http://java.sun.com/jsf/core"
  105. >
  106.  
  107. <h:head></h:head>
  108. <h:body>
  109. This and everything before will be ignored
  110. <ui:composition template="template.xhtml">
  111. <ui:define name="navigation">
  112. <ui:include src="menu.xhtml"/>
  113. </ui:define>
  114. <ui:define name="main">
  115. <h1>bird</h1>
  116. <p>
  117. next #{nextClient.next}
  118. </p>
  119. </ui:define>
  120. </ui:composition>
  121. This and everything after will be ignored
  122. </h:body>
  123. </html>
  124.  
  125. <?xml version="1.0" encoding="UTF-8"?>
  126. <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">
  127. <persistence-unit name="EntAppWeb-warPU" transaction-type="JTA">
  128. <jta-data-source>jdbc/legacy_resource</jta-data-source>
  129. <exclude-unlisted-classes>false</exclude-unlisted-classes>
  130. <properties>
  131. <property name="javax.persistence.schema-generation.database.action" value="create"/>
  132. </properties>
  133. </persistence-unit>
  134. </persistence>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement