ear

Automatic EJB Timer on Glassfish Server not triggering

落爺英雄遲暮 提交于 2019-12-20 01:59:13
问题 So I'm running a Java EAR application on a Glassfish 3.1. I created a stateless session bean with a single annotated timer function in my EJB Module. I don't have the exact code but it looks something like this: @Stateless public class SessionTimerBean { public SessionTimerBean(){ System.out.println("Constructor Called"); } @Schedule(second="*/10", minute="*", hour="*") public void scheduleTimer(final Timer t) { System.out.println("Timer Called"); } } When I launch Glassfish the debug info

EJB explanation regarding EAR vs WAR

╄→гoц情女王★ 提交于 2019-12-18 11:10:22
问题 I have just begun reading up on EJBs. Even as I venture into it I have a few questions based on what I have heard about them. Do applications using EJBs always have to be deployed as an EAR? Can applications containing EJBs be deployed just like other other java web projects using ECLIPSE and without using ANT? 回答1: 1.Do applications using ejb's always have to be deployed as EAR ? No. The EJB module is assembled into a JAR, lets call it myapp-ejb.jar as a naming convention. This contains the

How does Gradle resolve the javaee-api dependency to build an EAR?

蓝咒 提交于 2019-12-18 07:24:39
问题 I see that there's an EAR plugin for Gradle. How is it used to build an EAR ? Yes, there's an ear task. To build an EAR with an EJB module there's a dependency on java-ee. How is that dependency resolved? https://virgo47.wordpress.com/2015/05/13/why-gradle-doesnt-provide-provided/ http://www.lordofthejars.com/2015/10/gradle-and-java-ee.html http://www.adam-bien.com/roller/abien/entry/the_only_one_dependency_you I don't mind reading the fine manual -- just please specify a chapter at least

access a Local Session Bean from another EAR?

回眸只為那壹抹淺笑 提交于 2019-12-18 05:22:50
问题 How can I call a Local Session Bean inside an EAR from another EAR, both deployed in the same Glassfish v3 domain? This is the structure: Glassfish v3 Domain1 EAR1 EAR1-EJB.jar class TestSessionBean <-- @Stateless common.jar interface TestSessionLocal <-- @Local EAR2 EAR2-EJB.jar class TestSessionBeanClient <-- @Singleton, @LocalBean common.jar interface TestSessionLocal <-- @Local TestSessionBean implements TestSessionLocal, boths EARs has common.jar. I need to use TestSessionBean from

How do I create an EAR file with an ant build including certain files?

穿精又带淫゛_ 提交于 2019-12-17 22:16:46
问题 I'm using eclipse to build an ear file using ant. I'm using oc4j, and I want to make sure that orion-application.xml is included in the build. What I'm currently using but does not work is: <target name="ear" depends=""> <echo>Building the ear file</echo> <copy todir="${build.dir}/META-INF"> <fileset dir="${conf.dir}" includes="orion-application.xml"/> </copy> <ear destfile="${dist.dir}/${ant.project.name}.ear" appxml="${conf.dir}/application.xml"> <fileset dir="${dist.dir}" includes="*.jar,*

.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

痞子三分冷 提交于 2019-12-17 20:07:38
问题 I am upgrading Weblogic server from 9 to 10.3.6. when I am trying to deploy my ear application and got below exception. Caused By: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123) at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:89) at org

Create complete EAR Project with Maven and Eclipse Helios

旧时模样 提交于 2019-12-17 15:44:37
问题 I read some articles about how to set up eclipse and maven to create a new empty ear project but all solutions weren't complete or are to old. I believe that I need to create three pom.xml files / or three projects: client project with the WEB-APP structure (like a regular dynamic web project). This should result in a WAR file. server project with the ejbs. This should be a JAR file. ear project which joins both projects together. I tried that with help of the integrated maven plugin in

EAR vs separate EJB + WAR

吃可爱长大的小学妹 提交于 2019-12-17 15:28:11
问题 What's the difference in deploying application as EAR (with 1 EJB and 1 WAR module) vs separate modules? I want to use GlassFish 3 web profile but it does not support EAR archive. Can I simply use EJB and WAR as separate modules? Any other options? 回答1: There seems to be some confusion between 3 variants of deployment: An EAR that includes an EJB and WEB module Deploying a separate EJB module and a separate WEB module Deploying a WEB module that includes EJB classes or an EJB jar. In the

JBoss5: Cannot deploy due to java.util.zip.ZipException: error in opening zip file

爷,独闯天下 提交于 2019-12-17 10:54:37
问题 I have a web client and a EJB project, which I created with Eclipse 3.4. When I want to deploy it on Jboss 5.0.1, I receive the error below. I searched a lot but I wasn't able to find a solution to this. 18:21:21,899 INFO [ServerImpl] Starting JBoss (Microcontainer)... 18:21:21,900 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221) 18:21:21,900 INFO [ServerImpl] Bootstrap URL: null 18:21:21,900 INFO [ServerImpl] Home Dir: /Applications

Maven2: Best practice for Enterprise Project (EAR file)

一个人想着一个人 提交于 2019-12-17 02:17:15
问题 I am just switching from Ant to Maven and am trying to figure out the best practice to set up a EAR file based Enterprise project? Let's say I want to create a pretty standard project with a jar file for the EJBs, a WAR file for the Web tier and the encapsulating EAR file, with the corresponding deployment descriptors. How would I go about it? Create the project with archetypeArtifactId=maven-archetype-webapp as with a war file, and extend from there? What is the best project structure (and