Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling ejbs from jsp using jboss  RSS feed

 
hassan mahmood
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone tell me what configuration is required to call session or entity beans from jsp
or servlets using jboss application server.i dont want code just config.
a simple application need certain jar files to
call ejbs but how we can use ejb through jsp which uses tomcat web server.
thanx
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically you need to have access to all of the interfaces and classes that are used by/referenced by your EJBs. For example, this includes the remote interfaces.
You don't say which version of JBoss that you are using, but a good way to get this working is to use the combined JBoss/Tomcat distribution. This way you can package everything up inside an EAR file and deploy the entire application as a single unit. To then actually access your EJBs from your JSPs, just use the same code that you would normally use.
HTH
Simon
 
Michael Arndt
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Simon Brown:
You don't say which version of JBoss that you are using

I guess the JBoss version is not the main problem. Tomcat 4.x comes along with an own JNDI implementation which might cause some problems.
, but a good way to get this working is to use the combined JBoss/Tomcat distribution.

We started like this but in the end it's much harder. You do not have to pay too much attention on serialization, but when starting to deploy your application in a distributed environment the problems arise. E.g. the mail sesion provided by JBoss in the JNDI Context is not serializable although accessible from outside through configuration in the jboss.xml file. You can lookup and use this form within a jsp when running the bundled version of Tomcat and JBoss. Same with database connections...
I guess it's worth setting up a working distributed environment first since your mistakes will arise much earlier.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!