[jboss-user] [EJB 3.0] - Re: Can you Inject Local EJB from separate ear file?

jaikiran do-not-reply at jboss.com
Fri Jul 11 12:30:44 EDT 2008

anonymous wrote : NexusEventDefinition is a POJO with and @Entity annotation. The method on my session bean returns this pojo. I do not have an interface for it. Should I create an interface and modify the Session bean to return the interface instead of the class?

I had (incorrectly) assumed that nexusEventsService.findNexusEventDefinitionByName returns an bean interface. If its a POJO then you need not create an interface.

anonymous wrote : 
  | The packaging is as follows.
  | 1. I have two ear projects: NexusEvents.ear and KeyB.ear.
  | 2. I have a message driven bean in the KeyB.ear that I want to be able to call a session bean deployed in the NexusEvents.ear to return an instance of NexusEventDefinition.
  | 3. I have exported the session bean interface and the NexusEventDefinition class out of my NexusEvents project into a jar named nexusevents.jar and have deployed it with the KeyB.ear.

Does the NexusEvents.ear too have the NexusEventDefinition class?

Also did the jmx-console method in that wiki help in identifying the jar which was being used to pick up this class? The other way to figure out which jar is being used to load this NexusEventDefinition class, is to add the -verbose:class option to the run.bat and pass it as a JVM option. This will print to STDOUT (i would recommend redirecting it too a file since the output will be a lot) the classes that are being loaded in the JVM and also the jars that are being used to load these classes. In that output, search for this NexusEventDefinition class and see which jar(s) are being used.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163918#4163918

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163918

More information about the jboss-user mailing list