ejb-3.0

EJB - Performance issue (having more number of EJBs have effect on the performance)

扶醉桌前 提交于 2019-11-29 10:24:56
问题 We are developing an application with around 400 database tables. and have equal number of EJBs (All are Local interfaces and EJB is stateless) and one EJB is injected into another EJB by @EJB tag. My doubt is, is having more number of EJBs have any effect on the performance on the application? 回答1: Configuration and tuning You might need to size the system accordingly. Usually, each EJB has an associated pool (but it's app. server specific and I have only experience with Glassfish). So if

Many-to-Many link tables in grails (GORM) / hibernate

核能气质少年 提交于 2019-11-29 08:02:10
I'm playing aroud with Grails and am finding the ORM stuff tedious because I don't fully understand what I'm doing when it comes to domain classes. I'm hoping someone can put me back on track Consider the following Test Job One:Many Hardware Used on Job Many:One Physical Hardware ...this is analogous to the classic Order, OrderLine, Product scenario seen in university DB examples I've created the following domain classes class Job { String jobName String jobDescription } class HardwareOnJob { static hasMany = [ jobs:Job, physicalHardware:PhysicalHardware ] static belongsTo = Job String role }

sun.reflect.annotation.TypeNotPresentExceptionProxy error when deploy web-ear

与世无争的帅哥 提交于 2019-11-29 05:24:37
When I try to deploy ejd-ear, web-ear on to glassfish server. I added an ejb client dependency in web project. The ejb-ear deploys successfully. But when I try to deploy web-ear, it throws an exception . sun.reflect.annotation.TypeNotPresentExceptionProxy java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) at sun

logback with EJB3.1

瘦欲@ 提交于 2019-11-29 04:35:12
I am using logback/slf4j to handle logging in my application. Everything was working perfectly until I started using EJBs. Once I added a stateless EJB to my app, the logger started ignoring my logback.xml and stopped using my appenders. I switched to a programmatic logger configuration to see what was wrong and now I am getting the following error when I try to use my logger within the EJB: org.slf4j.impl.JDK14LoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext stemming from the line: LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); Is there any special

JBoss transaction timeout setting?

爷,独闯天下 提交于 2019-11-29 03:37:43
问题 We have a timer service triggered task in JBoss 5.1.0.GA application and the problem is that we cannot change the transaction time out. This long Lucene indexing can take longer than the default 300 second limit. The question is how to change the timeout value, adding @TransactionTimeout(1800) to the worker method or the class did not have any effect. Edit: Setting this in deploy/transaction-jboss-beans.xml works fine: <property name="transactionTimeout">1800</property> but the annotation

Maven EJB packaging with dependent libraries

隐身守侯 提交于 2019-11-29 03:36:26
问题 Im facing an issue how to correctly package my enterprise (EAR) application with simple WAR and EJB3 module for JBoss7 application server. The thing is, that EJB module is using XML-RPC library (from Apache) and Im still getting NoDefClassFound (classes from this xmlrpc lib) during deployment of EAR. The thing is, that maven- ejb -plugin does not package dependencies within final EJB jar but maven- ear -plugin does package it at the root of EAR directory. When EAR gets deployed, INSTALL is

Configuring a 'retry delay' in MQ Series

孤街浪徒 提交于 2019-11-29 03:17:47
问题 I'm hoping someone can help me - I'm using JBoss 5.1 and MQ Series 7 in an EJB / JMS based application. I have several message driven beans in my application, each listening on an MQ Series message queue. When an error is encountered during the processing of a message, I need to be able to configure a 'retry delay', so that mq series waits some period of time before attempting to redeliver the message. I have combed through MQ Series documentation extensively, and have not yet found a way to

CommonJ TimerManager versus EJB3 TimerService

醉酒当歌 提交于 2019-11-29 02:11:47
I have to implement a simple (not clustered) timer for WebLogic and it seems there are two different 'standard' options Timer and Work Manager API (CommonJ) EJB3.0 TimerService Does anyone have any advice on using the CommonJ TimerManager versus using the EJB3 TimerService in WebLogic 10.0? Thank you. TimerService in EJB 3.0 is somewhat limited as compared to CommonJ Timer Manager. For example, it requires boilerplate code and container-specific configuration to implement flexible task scheduling. This was simplified with the introduction of @Scheduled annotation in EJB 3.1. If you are stick

Understanding EJB3/JPA container-level transactions and isolation level

只愿长相守 提交于 2019-11-28 22:02:00
Consider this simplified view of some code with which I'm working: @Stateless(...) @Remote(...) @TransactionAttribute(TransactionAttributeType.MANDATORY) public class FirstEjbType { @EJB(...) private SecondEjbType secondEjb; @EJB(...) private ThirdEjbType thirdEjb; public void doSomething() { secondEjb.doSomething(); // WRITES SOMETHING TO THE DATABASE thirdEjb.doSomething(); // CAN'T SEE THAT SOMETHING IN THE DATABASE! } I've set the TransactionAttribute annotation to MANDATORY at the class-level. I understand this to mean that all methods such as doSomething() must be invoked within a

Multithreading in a stateless session bean?

穿精又带淫゛_ 提交于 2019-11-28 21:58:03
The EJB 3.0 specification does not allow a business method of a stateless session bean to create new threads. Why is that? What is wrong with creating additional worker threads that only do raw computations and never call into the app server? Say, my session bean implements a service that lets users to upload images, and the business method does cpu-intensive image processing on these images. Then it can only use one cpu core to do this job, even if the machine has 8 or more cores? If i utilize a third party image processing library, that internally creates worker threads, i would also violate