Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WAS 6 - deprecation warning

 
Babji Reddy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I rebuilt and deployed an ear file on WAS-6, I am getting this deprecation warning.
Earlier I was using WAS-5, and didn't get this warning.
Is this something J2EE spec compliance issue, or websphere issue? Also what is the work around
Thanks
-----------
Deprecated usage of direct JNDI lookup of resource jdbc/myDbName Datasource. The following default values are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
loginConfigurationName: null
loginConfigProperties: null
-----------
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, yeah, Babji, there are lots of changes. For one thing, v6 is using Java 1.4 and can use 1.5; the highest v5 goes is 1.3 (on its own -- I know you can set it to use 1.4, but you're asking for a world of trouble). Many of the methods have been deprecated, such as Enumeration. It doesn't hurt anything and your processes will still work just fine; it just means that you're being warned that you need to make changes because eventually, those methods will go away and you will go from warnings to flat-out errors. And the reason the methods are going away is because the replacement methods are much better in one fashion or another (speed, efficiency, threading, etc.).

Also, you can go to the "deprecated" lists for classes in the API documentation and they will tell you what the replacement is. If the entire class or package has been deprecated, Websphere usually tells you what replaced it. At least, I think that's correct. I'm taking three classes right now on top of having to learn Struts "yesterday", so my brain is dribbling gray matter. I'm sure someone will correct me if I'm wrong. Just be nice, guys.
 
Babji Reddy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat,
If a class is deprecated then yes, we can get it from the deprecation list of sun's JAVA API.
But this is warning as 'deprecated usage' of a setting in websphere. I had setup a datasource under resources, but didn't specify a resource-ref in any web.xml / ejb-jar.xml as I am using the datasource in a customservice. ( and hence no Web/EJB components).
In websphere 5, it still prompts that the resource-ref is not found and hence is using default settings. But from WAS6 onwards its adding a 'deprecated usage' warning to the message.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic