How do I deploy ejb jar in TomEE - ejb-3.0

M exploring openejb 4 beta with TomEE, could anyone explain how I deploy ejb jar on TomEE? I'm using it for testing purposes. Also, is it possible to configure tomee in eclipse and debug through ejbs??
Thanks in advance.

There are several scenarios for using EJB through the TOMEE(included OpenEJB), if you have an EAR file (consists of JARs and WAR) for deployment you need first active the APP folder in installed(means copied) TOMEE folder then you just drop your EAR file into APP folder and TOMEE unpack it and will be deployed properly.

Related

Package and deploy OSGi bundles and Karaf features in Karaf Container

Recently, I have been working on Apache Karaf project.
The first one is a CXF REST service example and the second one is an Apache Karaf Maven example to run and deploy a Karaf container.
What I would like to do is to combine these two. The idea is to download a couple of JAR files from a repository and then package them into a Karaf.
Building Karaf Assembly manually then deploying the created JAR files in my deploy folder under Karaf is not a good idea if the task is reccurent each day. I would very much like to automate this if possible?
To achieve automatic deploy of Java project in Karaf, follow these steps:
Create a feature project: It is a Maven project and its goal is to create a descriptor of JAR (bundles) to be deployed under Karaf. The packaging of this Maven project is feature.
For your project of Karaf Assembly, add your feature as dependency and add it as boot feature so it can be installed when Karaf is up.
Look at this project https://github.com/benson-basis/karaf-feature-version-tc.
It has all the necessary configuration to automate Karaf building and deploy.

How to test executable Maven Jar file through any web server?

I just created a maven project and did all the procedure to create a maven build. Then I exported that maven project as the jar file. I want to test the same jar. How could I achieve this with anyone of the web server like TomEE, JBoss?
Thanks in advance
Why not packagong a war instead of a jar? Then just drop it in the webapps/deploy folder of the server and start

Use of spring-boot-maven-plugin

While creating a spring boot project I define property in pom.xml as <packaging>war</packaging> with which I can create a war and thereafter deploy the war into server maybe tomcat or WAS.
But I came across a plugin named spring-boot-maven-plugin whose documentation states that it's use is to package executable jar or war archives and run an application in-place.
My query is why do we need this at all ?
If my packaging can tell me what to create and then can deploy it to run, what is the used of this plugin.
I am trying to understand a new project so wanted to be sure that every line makes sense
The maven plugin will create an "executable" archive. In the case of the war packaging, you would be able to execute your app with java -jar my-app.war. If you intend to deploy your Spring Boot application in an existing Servlet container, then this plugin is, indeed, not necessary.
The maven plugin does more things like running your app from the shell or creating build information.
Check the documentation
The Spring Boot Maven Plugin provides Spring Boot support in Apache Maven, letting you package executable jar or war archives and run an application “in-place”.
Refer this - https://www.javaguides.net/2019/02/use-of-spring-boot-maven-plugin-with.html

Apache camel app behaves differently in Tomcat when deployed with Maven

I do not understand the situation: whe I use Maven to deploy Apache camel routes to the Tomcat I do not see any routes with JMX. But if I package war with Maven and deploy it manually (copy *.war to webapps directory) - everything works fine.
What could cause such a behavior!?

grails tomcat 7 deployment

So I have a grails 2.0.4 application that works exactly the way I want. I created the war file and deployed it to Tomcat 7. I'm getting an error saying that the application can't find the jar I'm using to connect to oracle (ojdbc6.jar). The jar is listed under mywebapp/WEB-INF/lib. WHY can't it be found?? Any help would be greatly appreciated!
The jar file should be in the toplevel lib directory of your project (or specified as a dependency in a repository), not webapp/WEB-INF/lib. Is the jar file actually inside the warfile? You can test this by opening the war as a zip file, or by running jar tf target/mywebapp*.war and looking for ojdbc6.jar. If it is, it should get deployed and you should see it in tomcat7/webapps/mywebapp/WEB-INF/lib.
The default environment for grails war is production instead of development. Make sure you've got the production data source configured correctly in grails-app/conf/DataSource.groovy

Resources