Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 3.0 Stateless Session Bean question

 
Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

How'd I expose a method of my Stateless Session Bean in EJB 3.0? I don't seem to find any annotation to do that.

Thanks in advance,
Saeed
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have an interface that your bean implements. You bean is marked @Stateless, your interface can be marked @Remote or @Local. @Local is a default and you don't have to include that. But you do not have to do anything else to make methods available.

Mark
 
Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much for your response, Mark!

What if I have some methods that I'd not want to expose?

Thanks again and have a great weekend!
Saeed
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Saeed Amer:
Thank you so much for your response, Mark!

What if I have some methods that I'd not want to expose?

Thanks again and have a great weekend!
Saeed


Don't put them in your interface and probably declare them private.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic