`
winyee
  • 浏览: 54060 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

How to deploy the Persistence unit in the global JNDI ?

阅读更多
jboss recipe of the day

By default the persistence unit are available in the java: Context. If you wish to make them available also in the global naming Context you have to add two properties to your persistence.xml configuration file:

view plaincopy to clipboardprint?
   <persistence>
   <persistence-unit name="manager1">
      <jta-data-source>java:/MySQLDS</jta-data-source>
      <properties>
         <property name="jboss.entity.manager.jndi.name" value="java:/Manager1"/>
         <property name="jboss.entity.manager.factory.jndi.name" value="java:/Manager1Factory"/>
      </properties>
   </persistence-unit>
</persistence>


jboss.entity.manager.jndi.name gives you a transaction scoped entity manager you can interact with, while jboss.entity.manager.factory.jndi.name binds the entity manager factory into global JNDI.

http://www.mastertheboss.com/en/jboss-howto/45-jboss-persistence/188-how-to-deploy-the-persistence-unit-in-the-global-jndi-.html
分享到:
评论

相关推荐

    How To Deploy Kamailio

    How To Deploy Kamailio on Linux

    how to deploy to remote.txt

    maven deploy the local file to a remote server. 1.config your pom.xml; 2.config your setting.xml; 3.execte cmd --- mvn deploy

    Race-to-5G-Report.pdf

    The race to lead the world in 5G is underway and China, South Korea and other nations are competing to win. They understand that wireless leadership means billions in economic growth and millions of ...

    Pro JPA 2 in Java EE 8: An In-Depth Guide to Java Persistence APIs.pdf

    Learn to use the Java Persistence API (JPA) and other related APIs as found in the Java EE 8 platform from the perspective of one of the specification creators. A one-of-a-kind resource, this in-depth...

    The Definitive Guide to AdonisJs_Building Node.js App with JavaScript-2018

    Finally, we’ll learn how to deploy the application to a virtual server, and install custom domains and SSL certificates. It is my hope that by the time you are finished reading this book, you’ll ...

    The Debian Adminstrator's Handbook

    Debian系统管理员的手册,内容非常丰富。更新到了 Debian 7。epub 格式适合在移动设备上阅读。这本书的网站上(http://debian-handbook.info/)有pdf版本。

    sbt in Action(Manning,2015)

    Next, it shows you how to use the peripheral libraries in sbt to make common tasks simpler. Finally, it covers how to deploy software effectively. You’ll learn to appreciate how sbt improves the ...

    Implementing OpenShift

    You will learn everything you need to know in order to use OpenShift to develop and deploy applications in the cloud as well as how to deploy your very own OpenShift Origin-based Platform-as-a-Service...

    Little ASP.NET Core Book

    关于ASP.NET Core 2.0的一本小书。 The Little ASP.NET Core Book is structured as a tutorial. You'll build a to-do app from start to finish and learn: ...How to deploy the app to the web

    The Art of Memory Forensic

    It is the only book on the market that focuses exclusively on memory forensics and how to deploy such techniques properly. Discover memory forensics techniques: How volatile memory analysis improves ...

    Windows Server 2012 Security from End to Edge and Beyond

    Windows Server 2012 Security from End to Edge and Beyond shows you how to architect, design, plan, and deploy Microsoft security technologies for Windows 8/Server 2012 in the enterprise. The book ...

    Learning pyspark

    Learn why and how you can efficiently use Python to process data and build machine learning models in Apache Spark 2.0Develop and deploy efficient, scalable real-time Spark solutionsTake your ...

    Learning PySpark

    Learn why and how you can efficiently use Python to process data and build machine learning models in Apache Spark 2.0Develop and deploy efficient, scalable real-time Spark solutionsTake your ...

    OpenCV 3.x with Python By Example, 2nd Edition-Packt Publishing(2018).pdf

    You will also learn how to separate the foreground from the background in an image. Chapter 8, Object Tracking, shows you how to track different objects in a live video stream. At the end of this ...

Global site tag (gtag.js) - Google Analytics