Search Results

Search found 12 results on 1 pages for 'ejb2'.

Page 1/1 | 1 

  • SecurityException when accessing (ejb2-) session bean via local interface in JBoss 5

    - by sme
    I have the following problem with an EJB 2 SessionBean when deploying in JBoss 5: The SessionBean (called LVSKeepAliveDispatcher) requires a specific user role (called "LVSUser"), specified by <method-permission > <description></description> <role-name>LVSUser</role-name> <method > <description></description> <ejb-name>LVSKeepAliveDispatcher</ejb-name> <method-name>*</method-name> </method> </method-permission> in ejb-jar.xml. I now want to access this SessionBean from a Service (i.e. a class implementing the org.jboss.varia.scheduler.Schedulable interface that is then registered as a service) running inside the same JBoss instance. This is my jboss-service.xml: <server> <mbean code="org.jboss.varia.scheduler.Scheduler" name="lvs:service=TranslationService"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">de.repower.lvs.server.service.translation.TranslationService</attribute> <attribute name="SchedulableArguments"></attribute> <attribute name="SchedulableArgumentTypes"></attribute> <attribute name="InitialStartDate">NOW</attribute> <attribute name="SchedulePeriod">60000</attribute> <attribute name="InitialRepetitions">1</attribute> <attribute name="TimerName">jboss:service=Timer,name=TranslationServiceTimer</attribute> <depends><mbean code="javax.management.timer.Timer" name="jboss:service=Timer,name=TranslationServiceTimer"/></depends> <depends>jboss.j2ee:service=EJB,jndiName=de/repower/lvs/i18n/sessionbeans/LVSTranslation</depends> </mbean> As the service is deployed in the same vm as the session bean I want to call the session bean via the local interface, but I get a SecurityException when I try to create an instance. When instead I do a lookup of the RemoteInterface it works. This is the code inside the perform method of my service class: public void perform(Date now, long remainingRepetitions) { try { final UsernamePasswordHandler handler = new UsernamePasswordHandler(USERNAME, PASSWORD); final LoginContext lc = new LoginContext("client-login", handler); lc.login(); // Trying to instantiate an LVSKeepAliveDispatcher via remote interface // This part works LVSKeepAliveDispatcher localvHome = LVSKeepAliveDispatcherUtil.getHome().create(); LOGGER.info("Successfully instantiated an LVSKeepAliveDispatcher " + localvHome.toString()); // Trying to instantiate an LVSKeepAliveDispatcherLocal via local interface LVSKeepAliveDispatcherLocal localvLocalHome = LVSKeepAliveDispatcherUtil.getLocalHome().create(); // this code is unforunately never reached LOGGER.info("Successfully instantiated an LVSKeepAliveDispatcherLocal " + localvLocalHome.toString()); lc.logout(); } catch (final Exception ex) { LOGGER.error("Error: ", ex); } } Exception: 2009-02-17 10:38:02,266 INFO [lvsi18n] (Timer-2) Successfully instantiated an LVSKeepAliveDispatcher de/repower/lvs/server/service/alive/sessionbeans/LVSKeepAliveDispatcher:Stateless 2009-02-17 10:38:02,297 ERROR [org.jboss.ejb.plugins.SecurityInterceptor] (Timer-2) Error in Security Interceptor java.lang.SecurityException: Authentication exception, principal=internalSystemUser at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityContext(SecurityInterceptor.java:321) at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:243) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:205) at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:136) at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invokeHome(PreSecurityInterceptor.java:88) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107) at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:639) at org.jboss.ejb.Container.invoke(Container.java:1046) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:362) at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133) at $Proxy193.create(Unknown Source) at de.repower.lvs.server.service.translation.TranslationService.perform(TranslationService.java:68) at org.jboss.varia.scheduler.Scheduler$PojoScheduler.invoke(Scheduler.java:1267) at org.jboss.varia.scheduler.Scheduler$BaseListener.handleNotification(Scheduler.java:1235) at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153) at $Proxy87.handleNotification(Unknown Source) at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257) at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322) at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307) at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229) at javax.management.timer.Timer.sendNotification(Timer.java:1234) at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1203) at javax.management.timer.TimerAlarmClock.run(Timer.java:1286) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) To further diagnose the error I debugged through the SecurityInterceptor and found that in the first case (successful creating an instance via the remote interface) the security context "lvs-security" (which I defined in login-config.xml) is being used whereas in the second case (failure when creating an instance via the local interface) the generic security context "CLIENT-LOGIN" is being used. This is the definition of the securit context "lvs-security" in login-config.xml: <application-policy name = "lvs-security"> <authentication> <login-module code = "org.jboss.security.ClientLoginModule" flag = "required"> </login-module> <login-module code = "de.repower.lvs.security.UsersRolesLoginModule" flag = "sufficient"> </login-module> <login-module code = "de.repower.lvs.security.login.LVSLoginModule" flag = "required"> <module-option name = "lvs-jboss-host">localhost</module-option> <module-option name = "lvs-jboss-jndi-port">1099</module-option> </login-module> </authentication> </application-policy> I'm now kind of stuck and hope someone can give me a hint about where to further look for the cause of the problem. This worked fine in JBoss 3.2.7. Edit: My current workaround for this problem: create a new container configuration in jboss.xml and remove the security interceptor stuff from this configuration use this newly created container configuration for all my session beans that I only use locally (i.e. via local interface).

    Read the article

  • Ejb 2.0 deployment issues on Jboss 5.1

    - by Ravi
    I am deploying an ear application on Jboss 5.1.0. and i facing some issues. I had two ears one i had copied to deploy folder and the other in deploy-hasingleton. The ear which is in deploy-hasingleton is throwing some errors.when i serached in google i came to know that there is some issue with EJB 2.x on jboss 5.1.i was not able to find the solution. Below is the log. profileservice-secured.jar 11:16:17,162 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3 11:16:17,162 INFO [JBossASKernel] with dependencies: 11:16:17,162 INFO [JBossASKernel] and demands: 11:16:17,162 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 11:16:17,162 INFO [JBossASKernel] and supplies: 11:16:17,162 INFO [JBossASKernel] jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView 11:16:17,162 INFO [JBossASKernel] Class:org.jboss.deployers.spi.management.ManagementView 11:16:17,162 INFO [JBossASKernel] jndi:SecureManagementView/remote 11:16:17,162 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3) to KernelDeployment of: profileservice-secured.jar 11:16:17,162 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@17cabbb{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true} 11:16:17,162 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@1fedd5c{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true} 11:16:17,162 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@1ef4b31{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true} 11:16:17,833 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3 11:16:17,833 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureDeploymentManager ejbName: SecureDeploymentManager 11:16:18,066 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: SecureDeploymentManager/remote - EJB3.x Default Remote Business Interface SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager - EJB3.x Remote Business Interface 11:16:18,129 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3 11:16:18,129 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureManagementView ejbName: SecureManagementView 11:16:18,160 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: SecureManagementView/remote - EJB3.x Default Remote Business Interface SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView - EJB3.x Remote Business Interface 11:16:18,206 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3 11:16:18,206 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureProfileServiceBean ejbName: SecureProfileService 11:16:18,238 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: SecureProfileService/remote - EJB3.x Default Remote Business Interface SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService - EJB3.x Remote Business Interface 11:16:18,534 INFO [TomcatDeployment] deploy, ctxPath=/admin-console 11:16:18,612 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console' 11:16:21,759 INFO [TomcatDeployment] deploy, ctxPath=/ 11:16:21,853 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console 11:16:21,993 INFO [JBossASKernel] Created KernelDeployment for: hapi-0.5.jar 11:16:21,993 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=jca-ear-1.3-SNAPSHOT.ear,jar=hapi-0.5.jar,name=hapi-0.5,service=EJB3 11:16:21,993 INFO [JBossASKernel] with dependencies: 11:16:21,993 INFO [JBossASKernel] and demands: 11:16:21,993 INFO [JBossASKernel] and supplies: 11:16:21,993 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=jca-ear-1.3-SNAPSHOT.ear,jar=hapi-0.5.jar,name=hapi-0.5,service=EJB3) to KernelDeployment of: hapi-0.5.jar 11:16:23,302 INFO [ClientENCInjectionContainer] STARTED CLIENT ENC CONTAINER: hapi-0.5 11:16:23,473 INFO [SystemEventService] NODE_STARTED on node [HCA-5C1P1BS] 11:16:23,489 INFO [AbstractConnector] [aware] connector started 11:16:23,536 INFO [AbstractConnector] [datacaptor] connector started 11:16:23,536 INFO [AbstractConnector] [intellivue] connector started 11:16:23,972 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "gehc.com:service=KernelServiceMBean" is missing the following dependencies: Dependency "jboss.j2ee:module=kernel-ejb-1.3-SNAPSHOT.jar,service=EjbModule" (should be in state "Create", but is actually in state " NOT FOUND Depends on 'jboss.j2ee:module=kernel-ejb-1.3-SNAPSHOT.jar,service=EjbModule' ") Deployment "jboss.j2ee:module="kernel-ejb-1.3-SNAPSHOT.jar",service=EjbModule" is missing the following dependencies: Dependency "gehc.com:service=KernelServiceMBean" (should be in state "Create", but is actually in state "Configured") DEPLOYMENTS IN ERROR: Deployment "jboss.j2ee:module=kernel-ejb-1.3-SNAPSHOT.jar,service=EjbModule" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.j2ee:module=kernel-ejb-1.3-SNAPSHOT.jar,service=EjbModule' ** 11:16:24,003 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080 11:16:24,034 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009 11:16:24,050 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:49s:575ms I had marked the error with bold, there is some circular dependency also. Thanks Ravi S

    Read the article

  • Ejb lookup failing on WAS7.0 with NamingException

    - by Ayush
    Hi, I have an application developed on RAD using WAS 6.0. I migrated the code to WID 7.0. After making some changes in the EJB modules(Had to remove the bnd.xmi file from each ejb module to deploy the application on Application Server)the application is running fine, but the EJB modules give the following error: NamingException has Occured While Getting Local Home javax.naming.NameNotFoundException:nullName ejb/com/igcc not found in context "local:". I am not able to figure out what changes do it need to make to run the application on WID. Any help is appreciated. Thanks, Ayush

    Read the article

  • Is this valid EJB-QL?

    - by Yishai
    I have the following construct in EJB-QL several EJB 2.1 finder methods: SELECT distinct OBJECT(rd) FROM RequestDetail rd, DetailResponse dr WHERE dr.updateReqResponseParentID is not null and dr.updateReqResponseParentID = ?1 and rd.requestDetailID = dr.requestDetailID and rd.deleted is null and dr.deleted is null IDEA's EJB-QL inspection flags the use of the two object FROM RequestDetail rd, DetailResponse dr with an inspection which says: Several ranged variable declarations are not supported, use collection member declarations instead (e.g. IN(o.lineItems)) The queries themselves function fine (as in return the expected results) on JBoss 4.2. Is IDEA all wet here, or is there a valid issue with the query? And what is the actual preferred alternative syntax for such a query?

    Read the article

  • Maven2 multi-module ejb 3.1 project - deployment error

    - by gerry
    The problem is taht I get the following error qhile deploying my project to Glassfish: java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging But, let us start on how the project structure looks like in Maven2... I've build the following scenario: MultiModuleJavaEEProject - parent module - model --- packaged as jar - ejb1 ---- packaged as ebj - ejb2 ---- packaged as ebj - web ---- packaged as war So model, ejb1, ejb2 and web are children/modules of the parent MultiModuleJavaEEProject. _ejb1 depends on model. _ejb2 depends on ejb1. _web depends on ejb2. the pom's look like: _parent: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.dyndns.geraldhuber.testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <packaging>pom</packaging> <version>1.0</version> <name>MultiModuleJavaEEProject</name> <url>http://maven.apache.org</url> <modules> <module>model</module> <module>ejb1</module> <module>ejb2</module> <module>web</module> </modules> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> </dependencies> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <version>2.2</version> <configuration> <ejbVersion>3.1</ejbVersion> <jarName>${project.groupId}.${project.artifactId}-${project.version}</jarName> </configuration> </plugin> </plugins> </pluginManagement> </build> </project> _model: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <version>1.0</version> </parent> <artifactId>model</artifactId> <packaging>jar</packaging> <version>1.0</version> <name>model</name> <url>http://maven.apache.org</url> </project> _ejb1: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <version>1.0</version> </parent> <artifactId>ejb1</artifactId> <packaging>ejb</packaging> <version>1.0</version> <name>ejb1</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.ejb</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>testing</groupId> <artifactId>model</artifactId> <version>1.0</version> </dependency> </dependencies> </project> _ejb2: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <version>1.0</version> </parent> <artifactId>ejb2</artifactId> <packaging>ejb</packaging> <version>1.0</version> <name>ejb2</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.ejb</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>testing</groupId> <artifactId>ejb1</artifactId> <version>1.0</version> </dependency> </dependencies> </project> _web: <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>MultiModuleJavaEEProject</artifactId> <groupId>testing</groupId> <version>1.0</version> </parent> <groupId>testing</groupId> <artifactId>web</artifactId> <version>1.0</version> <packaging>war</packaging> <name>web Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.ejb</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>testing</groupId> <artifactId>ejb2</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> </configuration> </plugin> </plugins> <finalName>web</finalName> </build> </project> And the model is just a simple Pojo: package testing.model; public class Data { private String data; public String getData() { return data; } public void setData(String data) { this.data = data; } } And the ejb1 contains only one STATELESS ejb. package testing.ejb1; import javax.ejb.Stateless; import testing.model.Data; @Stateless public class DataService { private Data data; public DataService(){ data = new Data(); data.setData("Hello World!"); } public String getDataText(){ return data.getData(); } } As well as the ejb2 is only a stateless ejb: package testing.ejb2; import javax.ejb.EJB; import javax.ejb.Stateless; import testing.ejb1.DataService; @Stateless public class Service { @EJB DataService service; public Service(){ } public String getText(){ return service.getDataText(); } } And the web module contains only a Servlet: package testing.web; import java.io.IOException; import java.io.PrintWriter; import javax.ejb.EJB; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import testing.ejb2.Service; public class SimpleServlet extends HttpServlet { @EJB Service service; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println( "SimpleServlet Executed" ); out.println( "Text: "+service.getText() ); out.flush(); out.close(); } } And the web.xml file in the web module looks like: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>simple</servlet-name> <servlet-class>testing.web.SimpleServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>simple</servlet-name> <url-pattern>/simple</url-pattern> </servlet-mapping> </web-app> So no further files are set up by me. There is no ejb-jar.xml in any ejb files, because I'm using EJB 3.1. So I think ejb-jar.xml descriptors are optional. I this right? But the problem is, the already mentioned error: java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging Can anybody help?

    Read the article

  • Advice on a good comeback strategy after years of java abstinence

    - by simou
    It's almost 5 yrs since I left the java IT-project/enterprise business. Before I was a highly skilled enterprise developer / OO architect with more than 10 years experience in the business. I was proficient in many of those enterprise related technologies, including DWHing. Since then I haven't been doing any large scale programming, a little bit of C, Python, some dips into Scala, hacking a small java-plugin framework, opengl, but only as fun projects. Now I want to re-enter the java stage again, i.e. I'm looking for job opportunities as a developer. But I fear I might have lost much of my former punching strength, e.g. I would have to give my SQL knowledge a deep refreshing breath, re-visit basic stuff like design patterns, enterprise architectures, etc. and probably learn the new stuff like EJB3.1, JEE 6 too. I also missed the whole scrum craze. So from your own experience, what subject should I tackle first? Like technology (which ones?) or design skills (uml..)? But what I'm also wondering is since the basic design / architectural principles haven't changed much by now, what would be the chance on the job market for someone like me who left the java-world at a time where everything was less fragmented and EJB2.1 and XDoclet were de-facto standards? And how could I convince a potential employer that I'm still an effective on-the-job learner? Should I rather aim for "junior positions" ? Lots of questions but I'd be really glad if you could share your (encouraging :) thoughts with me. cheers! (btw I'm based in Austria)

    Read the article

  • Best current framework for unit testing EJB3 / JPA

    - by kennygrimm
    Starting new project using EJB 3 / JPA, mainly stateless session beans and batch jobs. I've used JUnit in the past on standard Java webapps and it seemed to work pretty well. In EJB2 unit testing was a pain and required a running container such as JBoss to make the calls into. Now that we're going to be working in EJB3 / JPA I'd like to know what companies are using to write and run these tests. Are Junit and JMock still considered relevant or are there other newer frameworks that have come around that we should investigate?

    Read the article

  • EJB3 Caching Instance Variables

    - by Justin
    Hi, I've noticed some strange code on a project I am working on - its a SLSB EJB3, and it uses a private instance variable to maintain a cache of data (it even calls it dataCache or something), with a getter/setter. For EJB2 and bellow, this was a typical EJB antipattern - SLSBs are not meant to retain state in between invocations, theres no guarantee you'll see the same data on a subsequent invocation. One of my colleagues said maybe its ok in EJB3 (we don't have much EJB3 experience), but still, its a Stateless Session Bean - why is it trying to maintain state, this doesn't make sense. Can anyone confirm if this is still a bad idea in EJB3 land, or if somehow it is ok? Thanks if you can help, Justin

    Read the article

  • J2EE/EJB + service locator: is it safe to cache EJB Home lookup result ?

    - by Guillaume
    In a J2EE application, we are using EJB2 in weblogic. To avoid losing time building the initial context and looking up EJB Home interface, I'm considering the Service Locator Pattern. But after a few search on the web I found that event if this pattern is often recommended for the InitialContext caching, there are some negative opinion about the EJB Home caching. Questions: Is it safe to cache EJB Home lookup result ? What will happen if one my cluster node is no more working ? What will happen if I install a new version of the EJB without refreshing the service locator's cache ?

    Read the article

  • Seam unit test can't connect to JBoss4.0.5GA

    - by user240423
    Does anybody know how to connect with JBoss4.0.5GA in Seam2.2.0GA unit test? I'm using Seam2.2.0GA with the embeded JBoss to run the unit test, the module needs to call old JBoss server (EJB2, because the vendor locked in JCA has to deploy on old JBoss). it's typical seam test case, and I can't get it connect to JBoss4.0.5GA by using jbossall-client.jar from JBoss4.0.5GA. so far I tested the embeded JBoss can only working with JBoss5.X server. with JBoss4.2.3GA, it report: [testng] java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: [testng] java.net.SocketException: end of file [testng] at org.jboss.remoting.transport.socket.SocketClientInvoker.handleException(SocketClientInvoker.java:122) [testng] at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:679) [testng] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122) [testng] at org.jboss.remoting.Client.invoke(Client.java:1634) [testng] at org.jboss.remoting.Client.invoke(Client.java:548) This is the best result I could get (JBoss5.1.0GA jbossall-client.jar call JBoss4.2.3GA server in the embeded JBoss env), here is the ant script: <testng classpathref="build.test.classpath" outputDir="${target.test-reports.dir}" haltOnfailure="true"> <jvmarg line="-Dsun.lang.ClassLoader.allowArraySyntax=true" /> <jvmarg line="-Dorg.jboss.j2ee.Serialization=true" /> <!-- <jvmarg line="-Djboss.remoting.pre_2_0_compatible=true" /> --> <jvmarg line="-Djboss.jndi.url=jnp://localhost:1099" /> <xmlfileset dir="src/test/java" includes="${ant.project.name}-testsuite.xml" /> </testng> Can anybody help?

    Read the article

  • ClassCastException When Calling an EJB Remotely that Exists on Same Server

    - by aaronvargas
    I have 2 ejbs. Ejb-A that calls Ejb-B. They are not in the same Ear. For portability Ejb-B may or may not exist on the same server. (There is an external property file that has the provider URLs of Ejb-B. I have no control over this.) Example Code: in Ejb-A EjbBDelegate delegateB = EjbBDelegateHelper.getRemoteDelegate(); // lookup from list of URLs from props... BookOfMagic bom = delegateB.getSomethingInteresting(); Use Cases/Outcomes: When Ejb-B DOES NOT EXIST on the same server as Ejb-A, everything works correctly. (it round-robbins through the URLs) When Ejb-B DOES EXIST on the same server, and Ejb-A happens to call Ejb-B on the same server, everything works correctly. When Ejb-B DOES EXIST on the same server, and Ejb-A calls Ejb-B on a different server, I get: javax.ejb.EJBException: nested exception is: java.lang.ClassCastException: $Proxy126 java.lang.ClassCastException: $Proxy126 I'm using Weblogic 10.0, Java 5, EJB3 Basically, if Ejb-B Exists on the server, it must be called ONLY on that server. Which leads me to believe that the class is getting loaded by a local classloader (on deployment?), then when called remotely, a different classloader is loading it. (causing the Exception) But it should work, as it should be Serialized into the destination classloader... What am I doing wrong?? Also, when reproducing this locally, Ejb-A would favor the Ejb-B on the same server, so it was difficult to reproduce. But this wasn't the case on other machines. NOTE: This all worked correctly for EJB2

    Read the article

1