A naming exception is quite often thrown simply because you tried to look up the DataSource by the wrong name. Make sure that the name you're using for the lookup is the same as the name you defined in the WebSphere Admin Console.
Using the same jndi name web application is able to get the connection from the pool. But the custom class is not getting the connection.Here i am using the same jndi name what i used in web application. the exception i am getting is
javax.naming.NameNotFoundException: Context: IFLMUD6DLGBLGNode01Cell/nodes/IFLMUD6DLGBLGNode01/servers/server1, name: orcads: First component in name orcads not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0]