• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 3 and Jboss integration with struts 2

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi I am using struts 2 plugin for EJB3 and JBoss as 5.0 with JDK 1.6 application server and trying to integrate EJB 3 application with Struts 2 web project .

I have done almost but still I am unable to get business object by annotation in my action class and given interceptors at Struts.xml file

@InjectEJB(name = "testingpro/AccountBean/remote")



when I am not putting Remote at the last of this name it is giving

AccontBean is not bound naming exception .



and if I am giving remote also it is saying

javax.naming.NotContextException: Proxy to jboss.j2ee:ear=testingpro.ear,jar=testingproEJB.jar,name=AccountBean,service=EJB3 implementing [interface org.jboss.ejb3.proxy.intf.SessionProxy, interface com.envision.account.AccountInterface, interface org.jboss.ejb3.proxy.intf.EjbProxy] is not a Context



I have object in JNDI Tree
like this
Other components with java:comp namespace

java:comp namespace of the component jboss.j2ee:ear=testingpro.ear,jar=testingproEJB.jar,name=AccountBean,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)
| +- com.envision.account.AccountBean (class: org.jnp.interfaces.NamingContext)
| | +- em (class: org.jboss.jpa.tx.TransactionScopedEntityManager)
| +- em (class: org.jboss.jpa.tx.TransactionScopedEntityManager)

+- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)


java: Namespace

+- iportDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
+- comp (class: javax.namingMain.Context)
+- 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: $Proxy100 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)
+- testingpro (class: org.jnp.interfaces.NamingContext)
| +- AccountBean (class: org.jnp.interfaces.NamingContext)
| | +- remote-com.envision.account.AccountInterface (class: Proxy for: com.envision.account.AccountInterface)
| | +- remote (class: Proxy for: com.envision.account.AccountInterface)

+- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- ProfileService (class: AOPProxy$0)
+- persistence.unit:unitName=testingpro.ear (class: org.jnp.interfaces.NamingContext)
| +- testingproEJB.jar#EjbtestingEJBPU (class: org.hibernate.impl.SessionFactoryImpl)
+- 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: $Proxy96 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)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy97 implements interface org.jboss.console.manager.PluginManagerMBean)


Please tell me what is the problem and how could I solve it

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sarvesh tiwari wrote:
I have done almost but still I am unable to get business object by annotation in my action class and given interceptors at Struts.xml file

@InjectEJB(name = "testingpro/AccountBean/remote")






Is that the correct annotation? Haven't heard about @InjectEJB. Is that Struts specific? Also please post the entire exception stacktrace (remember to wrap it in a code block while posting)
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This site can help, having the information

http://code.google.com/p/struts2ejb3-jboss-plugin/
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
more choices : https://coderanch.com/t/496362/Struts/Intergration-Struts-EJB-struts-ejb
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic