Originally posted by james wang:
I have a startup class in Weblogic Server, I want to get the LOCAL inteface of a Session Bean. I think they are in the same JVM...Maybe I can use the LOCAL EJB interface? If it is ok, something will be effective.
Anybody who could give me some advice or point out my fault?
Thank you very much!
From what I can tell of WebLogic, if the startup class is not in the same *JAR* as the EJB it's accessing, it cannot use a local interface. Note that local interfaces do not mean "local to this JVM" or even "local to this container" but rather "local to this JAR" (ClassLoader context?). This is related to the fact that a CMR between two entity beans can exist if and only if the two beans are packaged into the same JAR.
That being said, I haven't used WebLogic's T3StartupDef class because it runs for the container -- not each EJB application deployed in the container. Instead, I created a SLSB called "StartupSessionEJB" and gave it an initial pool size of 1 and max pool size of 1 and then didn't publish it in JNDI. It's ejbCreate() method gets called once and bingo I'm home free.