[Installation, Configuration & DEPLOYMENT] - Re: Migration problem to JBoss 5 GA
by onur.aktas
Hi.. Thank you for your reply. This EJB work with JBoss 4.2.3 GA and does not work with JBoss 5.0 GA
| package com.test.model.ejb.system;
|
| import com.test.model.entity.system.Usr;
| import javax.ejb.Stateless;
|
| @Stateless(name = "UsrEJB")
| public class UsrEJBBean implements UsrEJB, UsrEJBLocal {
| @PersistenceContext(name = "testPU")
| EntityManager em;
|
| public UsrEJBBean() {
| }
|
| public Usr persist(Usr usrEntity) {
| em.persist(usrEntity);
| return usrEntity;
| }
| }
It does not give any error, just warnings but it does not bind EJB to JNDI Tree like JBoss 4.2.3 GA.
Related Console logs when i deploy:
19:59:20,145 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 19:59:20,145 INFO [UpdateTimestampsCache] starting update timestamps cache at region: persistence.unit:unitName=test.ear/testEjb.jar#testPU.org.hibernate.cache.UpdateTimestampsCache
| 19:59:20,145 INFO [StandardQueryCache] starting query cache at region: persistence.unit:unitName=test.ear/testEjb.jar#testPU.org.hibernate.cache.StandardQueryCache
|
| 19:59:20,285 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=test.ear,jar=testEjb.jar,name=UsrEJB,service=EJB3
| 19:59:20,286 INFO [EJBContainer] STARTED EJB: com.test.model.ejb.system.UsrEJBBean ejbName: UsrEJB
| 19:59:20,286 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
|
|
| 19:59:20,339 WARN [WebServiceDeployerEJB] Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData@97955a49{UsrEJB}
| 19:59:20,768 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=test.ear/testWeb.war
| 19:59:21,381 INFO [JBossSerializationProvider] Using JBoss Serialization for JavaServer Faces.
| 19:59:21,398 INFO [JBossSerializationProvider] Using JBoss Serialization for JavaServer Faces.
Jndi Tree:
Other components with java:comp namespace
|
| java:comp namespace of the component jboss.j2ee:ear=test.ear,jar=testEjb.jar,name=UsrEJB,service=EJB3 :
|
| +- EJBContext (class: javax.ejb.EJBContext)
| +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
| +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- testPU (class: org.jboss.jpa.tx.TransactionScopedEntityManager)
| +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)
|
|
| java: Namespace
|
| +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
| +- comp (class: javax.namingMain.Context)
| +- testds (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
| +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)
| +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- Mail (class: javax.mail.Session)
| +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
| +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- jaas (class: javax.naming.Context)
| | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- profileservice (class: org.jboss.security.plugins.SecurityDomainContext)
| +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
| +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
| +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
| +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
| +- timedCacheFactory (class: javax.naming.Context)
| Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
|
|
| Global JNDI Namespace
|
| +- UserTransactionSessionFactory (proxy: $Proxy104 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
| +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
| +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
| +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- topic (class: org.jnp.interfaces.NamingContext)
| +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- ProfileService (class: AOPProxy$0)
| +- queue (class: org.jnp.interfaces.NamingContext)
| | +- DLQ (class: org.jboss.jms.destination.JBossQueue)
| | +- ExpiryQueue (class: org.jboss.jms.destination.JBossQueue)
| +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
| +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- jmx (class: org.jnp.interfaces.NamingContext)
| | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor (proxy: $Proxy100 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
| +- TomcatAuthenticators (class: java.util.Properties)
| +- persistence.unit:unitName=test.ear (class: org.jnp.interfaces.NamingContext)
| | +- testEjb.jar#testPU (class: org.hibernate.impl.SessionFactoryImpl)
| +- console (class: org.jnp.interfaces.NamingContext)
| | +- PluginManager (proxy: $Proxy101 implements interface org.jboss.console.manager.PluginManagerMBean)
Thank you very much.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198518#4198518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198518
17 years, 4 months
[Beginners Corner] - Re: jboss-dukes-bank app
by pepelara
Hi,
I was studying my web app and I have got the problem. It is in the class DefinitionTag that extends SimpleTagSupport. In the method,
| public void doTag() {
| try {
| getJspBody()
| .invoke(null);
|
| Definition definition = new Definition();
| PageContext context = (PageContext) getJspContext();
| setScreen(screenId);
| ArrayList params = (ArrayList) screens.get(this.screenId);
| Iterator ir = null;
|
| if (params != null) {
| ir = params.iterator();
|
| int cont = 0;
| while (ir.hasNext()){
| definition.setParam((Parameter) ir.next());
| cont ++;
| }
| Debug.println("DefinitionTag: params defined: " + cont);
|
| // put the definition in the page context
| context.setAttribute(definitionName, definition,
| PageContext.APPLICATION_SCOPE);
| } else {
| Debug.println("DefinitionTag: params are not defined.");
| }
| } catch (Exception ex) {
| ex.printStackTrace();
| }
| }
|
the line ArrayList params = (ArrayList) screens.get(this.screenId); returns null, so the rest of the code
| if (params != null) {
| ir = params.iterator();
|
| int cont = 0;
| while (ir.hasNext()){
| definition.setParam((Parameter) ir.next());
| cont ++;
| }
| Debug.println("DefinitionTag: params defined: " + cont);
|
| // put the definition in the page context
| context.setAttribute(definitionName, definition,
| PageContext.APPLICATION_SCOPE);
| } else {
| Debug.println("DefinitionTag: params are not defined.");
| }
|
returns, on the console, the message: "DefinitionTag: params are not defined." And it is because the value of this.screenId is,
"${requestScope['javax.servlet.forward.servlet_path']}"
that belong to screendefinitions.jspf as follow,
| <%@ taglib uri="SimpleTagLibrary" prefix="tt" %>
| <tt:definition name="bank" screen="${requestScope['javax.servlet.forward.servlet_path']}">
| <tt:screen screenId="/main">
| <tt:parameter name="title" value="Duke's Bank" direct="true"/>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/main.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/transferAck">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleTransferSucceeded"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/transferAck.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/transferFunds">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleTransferFunds"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/transferFunds.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/atmAck">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleWDSucceeded"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/atmAck.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/atm">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleWD"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/atm.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/accountHist">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleAccountHistory"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/accountHist.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/accountList">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleAccountList"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp" direct="false"/>
| <tt:parameter name="body" value="/accountList.jsp" direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/logoff">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleLogoff" />
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp" direct="false"/>
| <tt:parameter name="links" value="/template/nolinks.jsp" direct="false"/>
| <tt:parameter name="body" value="/logoff.jsp" direct="false"/>
| </tt:screen>
| </tt:definition>
|
I think the value might to be "/main", "/transferFunds", etc...
and this is my problem.
Will you help me?
Merry Christmas,
Jose Alvarez de Lara(Oggie Svennson)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198510#4198510
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198510
17 years, 4 months
[JCA/JBoss] - Re: Changing XslUrl in XslSubDeployer
by makas
anonymous wrote : Why would you like to make the changes in the .xsl file?
When a -ds.xml is deployed, the XSLSubDeployer constucts MBeans.
createService() and init(DeploymentInfo) methods in this class transform -ds.xml into something like this
<service>
| <mbean ...>
| <depends ...>
| ...
| <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
| display-name="ManagedConnectionFactory for ConnectionFactory SomeName"
| name="jboss.jca:service=ManagedConnectionFactory,name=SomeName">
| <attribute name="ManagedConnectionFactoryProperties">
| <properties>
| ...
| </properties>
| </attribute>
| <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=SomeName</depends>
| </mbean>
| ...
| </depends>
| </mbean>
| </service>
I want to add some changes to persist some attributes:
<service>
| <mbean ...>
| <depends ...>
| ...
| <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
| display-name="ManagedConnectionFactory for ConnectionFactory SomeName"
| name="jboss.jca:service=ManagedConnectionFactory,name=SomeName"
| xmbean-dd="">
| <xmbean>
| <description>PersistentServiceExample</description>
| <descriptors>
| <persistence persistPolicy="OnUpdate"/>
| <persistence-manager value="org.jboss.mx.persistence.DelegatingPersistenceManager"/>
| </descriptors>
| <class>org.jboss.resource.connectionmanager.RARDeployment</class>
| <attribute access="read-write" getMethod="getManagedConnectionFactoryProperties
| setMethod="setManagedConnectionFactoryProperties">
| <name>ManagedConnectionFactoryProperties</name>
| <type>org.w3c.dom.Element</type>
| </attribute>
| </xmbean>
| <attribute name="ManagedConnectionFactoryProperties">
| <properties>
| ...
| </properties>
| </attribute>
| <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=SomeName</depends>
| </mbean>
| ...
| </depends>
| </mbean>
| </service>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198509#4198509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198509
17 years, 4 months