Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在阅读与JavaEEAPI 相关的最佳实践,并遇到了一个建议,可以一起使用@Stateless以@Path确保线程安全。这促使我询问,当我们什么都不提时,会话 bean 的类型是什么?默认情况下是有状态的吗?
JavaEE
@Stateless
@Path
会话 bean 没有默认类型。只有通过使用@Stateless、@Stateful 或@Singleton 注释类才能成为会话bean。