[JBoss JIRA] Created: (JBAS-3937) ejb 3.0- jsf application: deploy error for session bean with no local home interface
by mauro avon (JIRA)
ejb 3.0- jsf application: deploy error for session bean with no local home interface
------------------------------------------------------------------------------------
Key: JBAS-3937
URL: http://jira.jboss.com/jira/browse/JBAS-3937
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: JBossAS-4.0.5.GA
Environment: the as runs on a windows server 2003 enterprise edition service pack 1
Reporter: mauro avon
Assigned To: Bill Burke
Priority: Blocker
I have developed a very simple web application with Oracle JDeveloper 10.1.3.1 j2ee edition (no adf). The application uses ejb 3.0 and jsf technology.
The application has two projects: Model and ViewController. To deploy the application I created an ejb jar deployment profile for the model project and a war deployment profile for the ViewController. Then I created a new 'Deployment' project with an ear deployment profile to assemble the ejb jar and war deployment profiles. In this way I was able to deploy to standalone oc4j.
Now I want to deploy to jboss 4.0.5 GA, I mapped the jboss connection within jdev and selected 'deploy to jboss'. The ear file is transferred to the correct folder, but the application folder is not generated and the jboss log shows at least one error. It seems it expects a local-home tag in the web.xml (related to a session bean).
Below I enclose the jboss log, the session bean definition, the web.xml file. As you can see in the web.xml the <local-home> tag is really missing. But home interfaces should not be used in ejb 3.0, and I cannot manage to add a local interface to my session bean and make the application work.
I posted the problem to the forum but nobody answered (see reference)
// log
2006-12-01 16:20:51,250 WARN [org.jboss.util.NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
2006-12-01 16:20:51,250 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Problem in init
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: expected one local-home tag)
at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:749)
at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:356)
// session bean class
package provascr.business;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import provascr.persistence.SoCnfCategTpinvito;
@Stateless(name="ProvaScrFacade")
public class ProvaScrFacadeBean implements ProvaScrFacade,
ProvaScrFacadeLocal {
@PersistenceContext(unitName="Model")
private EntityManager em;
public ProvaScrFacadeBean() {
}
public Object mergeEntity(Object entity) {
return em.merge(entity);
}
public Object persistEntity(Object entity) {
em.persist(entity);
return entity;
}
/** <code>select o from SoCnfCategTpinvito o</code> */
public List<SoCnfCategTpinvito> querySoCnfCategTpinvitoFindAll() {
return em.createNamedQuery("SoCnfCategTpinvito.findAll").getResultList();
}
}
// web.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
<description>Empty web.xml file for Web Application</description>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<jsp-config/>
<ejb-local-ref>
<ejb-ref-name>ejb/ProvaScrFacade</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>provascr.business.ProvaScrFacadeLocal</local>
<ejb-link>ProvaScrFacade</ejb-link>
</ejb-local-ref>
</web-app>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Commented: (JBAS-2861) HttpSession sharing between WAR modules
by Brian Stansberry (JIRA)
[ http://jira.jboss.com/jira/browse/JBAS-2861?page=comments#action_12351369 ]
Brian Stansberry commented on JBAS-2861:
----------------------------------------
My goal is to have this down end of Jan '07, perhaps early February.
> HttpSession sharing between WAR modules
> ---------------------------------------
>
> Key: JBAS-2861
> URL: http://jira.jboss.com/jira/browse/JBAS-2861
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Web (Tomcat) service, Clustering
> Affects Versions: JBossAS-3.2.7 Final, JBossAS-3.2.6 Final
> Reporter: Brian Stansberry
> Assigned To: Brian Stansberry
> Fix For: JBossAS-4.2.0.CR1
>
>
> Creating a redacted version of JBAS-1909, which was opened as a non-public JIRA issue by a customer.
> Our J2EE application is composed of several modules, each one addressing one facet of our business process, and currently this application has one web module (WAR) and several JAR modules (EJB).
> We need to divide this web module into several smaller web modules.
> In order to separate our unique WAR file into several WARs we must guarantee HttpSession sharing. This is due to the fact that we have a lot of session attributes that are used throughout the entire application and we cannot afford to refactor the application, in fact, that's impossible.
> The security aspects for this requirement are completely addressed by the JBoss/Tomcat Single Sign-On mechanism but the session sharing requirements are not.
> The ideal scenario is to keep the same HttpSession (same object in the heap, same session ID) when authenticating into one application (HttpSession created) and then forwarding to another application.
> The current SSO mechanism allows the user to access the second application without reauthentication, as you know, but it creates a new HttpSession object. Also, if the two WARs have different session timeouts, if you access application A, migrates to application B, stays there until session in application A expires and then returns to application A from application B, a new HttpSession is also created in application A.
> The ideal solution is to have one unique, monolithic session to all web applications configured to share a common session. IBM WebSphere and BEA WebLogic do have this configuration and feature. Please check the links below in case you want more information:
> WebSphere Application Server V5: Sharing Session Context - http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/tips0215.ht...
> BEA Weblogic - Enabling Web applications to share the same session - http://e-docs.bea.com/wls/docs90/webapp/sessions.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Closed: (JBAOP-195) Error running ArgsTestCase in Eclipse
by Kabir Khan (JIRA)
[ http://jira.jboss.com/jira/browse/JBAOP-195?page=all ]
Kabir Khan closed JBAOP-195.
----------------------------
Resolution: Cannot Reproduce Bug
Works fine with latest Eclipse & JDK
> Error running ArgsTestCase in Eclipse
> -------------------------------------
>
> Key: JBAOP-195
> URL: http://jira.jboss.com/jira/browse/JBAOP-195
> Project: JBoss AOP
> Issue Type: Task
> Reporter: Kabir Khan
> Assigned To: Kabir Khan
> Fix For: 2.0.0.alpha3
>
>
> This is when running with generated advisors. It works fine when running from command-line on Windows, but causes an error when running/debugging in Eclipse. All other tests work fine in both places. My main concern is that this error in Eclipse might show up on other platforms
> java.lang.RuntimeException: java.lang.RuntimeException: org.jboss.aop.JoinPoint in org/jboss/aop/joinpoint.java
> at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:174)
> at org.jboss.test.aop.args.POJO$POJOAdvisor.bunchArgs_N_5735936556171587907(POJO$POJOAdvisor.java)
> at org.jboss.test.aop.args.POJO.bunchArgs(POJO.java)
> at org.jboss.test.aop.args.ArgsTestCase.testBench(ArgsTestCase.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.RuntimeException: org.jboss.aop.JoinPoint in org/jboss/aop/joinpoint.java
> at javassist.CtClassType.getClassFile2(CtClassType.java:194)
> at javassist.CtClassType.prune(CtClassType.java:1046)
> at org.jboss.aop.AOPClassPool.cacheCtClass(AOPClassPool.java:138)
> at javassist.ClassPool.get0(ClassPool.java:405)
> at javassist.ClassPool.get(ClassPool.java:371)
> at javassist.compiler.MemberResolver.lookupClass0(MemberResolver.java:408)
> at javassist.compiler.MemberResolver.lookupClass(MemberResolver.java:372)
> at javassist.compiler.MemberResolver.lookupFieldByJvmName2(MemberResolver.java:258)
> at javassist.compiler.TypeChecker.fieldAccess(TypeChecker.java:791)
> at javassist.compiler.TypeChecker.atFieldRead(TypeChecker.java:719)
> at javassist.compiler.TypeChecker.atExpr(TypeChecker.java:521)
> at javassist.compiler.ast.Expr.accept(Expr.java:67)
> at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:603)
> at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156)
> at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
> at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:235)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:323)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.MemberCodeGen.atTryStmnt(MemberCodeGen.java:140)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:360)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.CodeGen.atSwitchStmnt(CodeGen.java:533)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:362)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.MemberCodeGen.atTryStmnt(MemberCodeGen.java:140)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:360)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:285)
> at javassist.compiler.Javac.compileBody(Javac.java:212)
> at javassist.CtBehavior.setBody(CtBehavior.java:221)
> at javassist.CtBehavior.setBody(CtBehavior.java:196)
> at org.jboss.aop.instrument.JoinPointGenerator.createInvokeNextMethod(JoinPointGenerator.java:654)
> at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:234)
> at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:164)
> ... 20 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Created: (JBAOP-338) Expose getInstance on InstanceAdvisor
by Clebert Suconic (JIRA)
Expose getInstance on InstanceAdvisor
-------------------------------------
Key: JBAOP-338
URL: http://jira.jboss.com/jira/browse/JBAOP-338
Project: JBoss AOP
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Clebert Suconic
If you want to control instantiation of an Aspect, you need exposure of the Object on InstanceAdvisor, as AspectFactory holds the instance in a private way.
I had an use case where I needed to control locks in an interceptor, and I needed a single instance for every descendant of that object. I could do it Straightforward by using Factories but since I couldn't get exposure of the Instance I couldn't have use the factory feature.
I think it would make sense to expose it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months