Announcement Announcement Module
Collapse
No announcement yet.
Looking up a SLSB EJB3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Looking up a SLSB EJB3

    Hi,

    I have the following code working:

    Code:
        <jee:jndi-lookup 
            id="UUIDEJB"
            jndi-name="uuid"
            resource-ref="true"
            cache="false"
            proxy-interface="utils.UUID"
        />
    ....
    
        public byte[] generateUUID()
        {
            System.out.println("Generated by.." + this.hashCode());
            return generator.generateRandomBasedUUID().asByteArray();
        }
    The result is something I get is something like this:

    Code:
    Generated by..17241974
    Generated by..17241974
    Generated by..17241974
    Generated by..17241974
    Generated by..17241974
    Is this a correct behaviour? Shouldn't different beans be called?

  • #2
    Usually the SLSBs are pooled by the container. Whether your requests are served by the same instance or not is decided by the container and therefore your result is perfectly valid.

    Regards,
    Andreas

    Comment

    Working...
    X