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 on Linux
maven deploy the local file to a remote server. 1.config your pom.xml; 2.config your setting.xml; 3.execte cmd --- mvn deploy
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 ...
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...
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 ...
Debian系统管理员的手册,内容非常丰富。更新到了 Debian 7。epub 格式适合在移动设备上阅读。这本书的网站上(http://debian-handbook.info/)有pdf版本。
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 ...
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...
关于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
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 shows you how to architect, design, plan, and deploy Microsoft security technologies for Windows 8/Server 2012 in the enterprise. The book ...
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 ...
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 ...
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 ...