• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB newbie

 
ammu vasanth
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
i've been in jsp for sometimes now and have been allotted an EJB project which is partly complete. Am told to go through the docs myself and get a running demo of the so-far developed project in two days.!! just that am not very clear of the requirements to be asked of them.i have this .ear file to be run on websphere with DB2 as backend but everytime i try deploying this .ear package , am getting various jndi look up failure messages..i know this question is very vague but any help would be greatly appreciated..i tried some demo .ear applications also, but they are small, while this project iam in to , is a bit complicated and involves a lot of EJBs ..Please help out with some suggestions.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

am getting various jndi look up failure messages

Its a bit difficult for anyone to help you with such a vague description of whats wrong. Here's a few tips though with WebSphere:

Have a look at dumpNameSpace - which is in WAS_HOME/bin. Run this and it will describe whats in the JNDI namespace. You can compare this with what's in the ear.

I am guessing that the most likely object missing from JNDI is the DataSource - since you can't configure a DataSource in the ear for deployment. You'll most likely have to set this up. Speak to whoever has passes the project on to you.

Also have a look at ejbDeploy (again in WAS_HOME/bin) since this gives much clearer error messages and is much more transparent than the deploy process through the Admin Console.
 
ammu vasanth
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul
Your suggestions came in very handy. I now deployed the .ear file through the ejbdeploy.bat as u've mentioned without any error. The only problem seems to be the datasource binding. As our previous developers have left , i need to make it out from the code they've been developing. Will the datasource name be hard coded somewhere in a .xml file ? i searched through the ejb-jar.xml but to no avail. Please do let me know how to spot this out as this is the only problem in getting the demo ready. I would really be glad for any inputs. Thanks in advance.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there's a hard coded reference to the DataSource it will probably be in the code somewhere. You shouldn't really get this problem deploying the app - since a missing JNDI binding will probably not be an issue till you try to run the code. If you can't start the app - look out for JNDI references in a ServletContextListener or init() methods of servlets since you can configure servlets to initialize when an web app is deployed. Check the activity.log - since this is the closest thing WAS has to the sort of console output you see on other servers.
 
ammu vasanth
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was no problem in getting the app. deployed through the admin console. The app only fails to get "started". I checked the activity log file without success. Anyhow, i managed a demo on Oracle9iAS, which is much easier to control and deploy . I had to alter a few xml files ,the data source and a few lines of code. I just want to know if websphere really makes life easier for programmers. Where does it score when it comes to choice? if am to recommend websphere to my client, what all features should i talk in favour of websphere?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I just want to know if websphere really makes life easier for programmers

Absolutely not. It is (IMHO) one of the most complex application servers out there. Things are easier for developers if you are actually writing you J2EE app specifically for WAS using thier supplied IDE.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!