Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Resource type  RSS feed

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is regarding the res-type tag in ejv-jar.xml.
Can I create my own resource apart from the standard one javax.sql.DataSource , javax.jms.Queue etc.
Thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can. If you have a resource factory for managing <something>, you can just define res-type as "com.foobar.MySomethingFactory".
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume that you have tried out that!
You are great Lasse!
What do I put res-auth ?
Thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've only tried a connector (where res-type is "javax.resource.cci.ConnectionFactory"). I've never tried adding a resource reference for a non-standard resource manager (as in "not java.* or javax.*") but it should be possible as long as the vendor supports it (in other words, the specification doesn't prevent it).
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you aware of any such app server ?. Your help will be higly appreciated.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you aware of any such app server ?. Your help will be higly appreciated.

Unfortunately no. However, it might be possible for you to just refer to the resource with whatever res-type you wish, bind your homegrown resource factory into the JNDI tree, and fetch it from your EJB. Try it if you have time. Remember though that all bets are off... I really have no idea whether this hack would work or not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!