在没有Spring的情况下配置JPA和JOTM(Configuring JPA and JOTM without Spring)
任何人都可以给我一个在没有使用Spring的环境中配置JPA / JOTM的例子吗?
我正在用Tomcat和JPA / MySQL构建一个Web应用程序。 目前我只是在JPA持久性单元中使用RESOURCE_LOCAL事务,但如果可能的话,我想迁移到一个真正的事务管理器(JOTM)。 我看遍了整个网络,我似乎能够找到的所有例子都是使用Spring。
任何人都可以将我指向正确的方向吗?
谢谢
Can anyone point me to an example of configuring JPA/JOTM in an environment where Spring isn't being used?
I'm building a web-app with Tomcat and JPA/MySQL. Currently I'm just using the RESOURCE_LOCAL transactions in the JPA persistence unit, but I'd like to move to a real transaction manager (JOTM) if possible. I've looked all over the web and all I seem to be able to find are examples using Spring.
Can anyone point me in the right direction?
Thanks
原文:https://stackoverflow.com/questions/2405491
最满意答案
制作一个工件来将jar构建到目录,然后创建一个执行另一个jar的运行配置,然后在底部有一个列表,您可以在其中使用IntelliJ构建jar。
Make an artifact to build the jar to the directory and then make a run config that executes the other jar, and down at the bottom there is a list where you can have IntelliJ build the jar.
相关问答
更多-
TCP/IP模型是一个________。[2023-05-19]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
我发现了问题。 File directory = new File(System.getProperty("user.home") + "/AppData/Roaming" + "/Folder WithMyJar"); directory.mkdir(); Process p = Runtime.getRuntime().exec("java -jar " + directory.getPath() + "\\" + "myJar.jar arg1 arg2"); InputStream inError ...
-
我有同样的问题。 确保您的MANIFEST.MF在: src/main/resources/META_INF/ 不 src/main/java/META_INF/ I had the same problem. Make sure your MANIFEST.MF is in: src/main/resources/META_INF/ NOT src/main/java/META_INF/
-
好吧,在搜索了许多不适用的大量不同问题之后,因为它看起来我的代码没问题,所以我查看了jar创建过程。 我一直在创建jar来运行intellij idea函数来创建工件,标准程序,从带有依赖项的模块,链接主类,添加配置文件和所有东西。 我不知道那里发生了什么,但当我尝试从命令行手动从一开始就运行一切(基本上只是几个maven和java命令),我设法创建一个完全不同的jar和那个运行正常。 我仍然不知道为什么IDE工件不起作用并且会感谢任何评论,以便遇到此问题的人可以在这里学到一些东西。 非常感谢所有给我一点点 ...
-
最简单的方法是使用此处所述的运行配置: https : //confluence.jetbrains.com/display/IDEADEV/Run+Configurations The perhaps easiest way is to use Run Configurations as described here: https://confluence.jetbrains.com/display/IDEADEV/Run+Configurations
-
制作一个工件来将jar构建到目录,然后创建一个执行另一个jar的运行配置,然后在底部有一个列表,您可以在其中使用IntelliJ构建jar。 Make an artifact to build the jar to the directory and then make a run config that executes the other jar, and down at the bottom there is a list where you can have IntelliJ build the j ...
-
这是说找不到类,因为它不在你的类路径上。 这取决于您构建应用程序的方式(Ant,Maven等),因为这决定了.jar文件的位置是如何知道的,以及.jar文件的位置。 如果您使用的是IDE,通常会有某种Libraries占位符,您可以在其中定义您所依赖的.jars。 It is saying that the class cannot be found because it is not on your classpath. This depends on how you build your applica ...
-
我不得不这样添加库: java -jar -Djava.library.path=/home/rinaldi/Sources/opencv-master/build/lib test.jar 希望这有助于某人。 I had to add the library this way: java -jar -Djava.library.path=/home/rinaldi/Sources/opencv-master/build/lib test.jar Hope this helps someone.
-
假设您正在使用依赖示例中的maven,您可以使用多个maven配置文件来解决此问题。 您可以拥有包含dependencies部分的prod和debug配置文件。 调试者可以跳过所有hadoop相关依赖项的provided标记,其中包括最终JAR中的依赖项。 您可以在此处详细了解maven配置文件。 Assuming that you are using maven from your dependency example, you can use multiple maven profiles to tac ...