Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS
How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS [message #507960] Fri, 15 January 2010 05:33 Go to next message
Eclipse UserFriend
Hi, everybody!
Sorry, for my poor English.
To make call EJB3 from RAP:
1. Create plugin someYourEJB from existing jar with EJB's interfaces which you are about to call from RAP;
2. Create plugins from existing jar JBOSS/lib (included folder indorsed), JBOSS/client (name jbossClient2Rap), JBOSS/common/lib. I don't know which concrete jboss jar need Sad

3. add plugin someYourEJB as a dependency to jbossClient2Rap.
4. add plugins created on step 1&2 as a dependency to your RAP plugin.

Here's an example code for calling the EJB3' remote interface :

Properties props = new Properties();
props.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
// here you put JBoss AS server's address
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
Context context = new InitialContext(props);
context = new InitialContext( props );
// get ejb3
Object obj = context.lookup("BookSession/remote");
IBookSession bookSession = (IBookSession) obj;
// call some business method
List<Book> books = bookSession.list();
...

Thats all
Question:
Please, list jboss really nessesary libraries.


Re: How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS [message #508187 is a reply to message #507960] Sun, 17 January 2010 06:52 Go to previous messageGo to next message
Eclipse UserFriend
Anybody, please, list essential jboss libs?
Re: How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS [message #508228 is a reply to message #508187] Sun, 17 January 2010 16:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dimitry,

I use JBoss 5 under RCP.
Intend to test under RAP in the future.

A suggestion, try Maven (it has a good Eclipse UI plugin).
Maven has capability to determine essential prerequisites for many
product/frameworks including JBoss.

Also, if you are using Hibernate, you can evaluate dependencies with, or
without, JBoss.

Even if you don't want to use Maven as your build system,
it will help determine dependencies.

Hope this helps

Charlie

Dmitry Egorov wrote:
> Anybody, please, list essential jboss libs?
Re: How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS [message #508279 is a reply to message #507960] Mon, 18 January 2010 04:39 Go to previous messageGo to next message
Eclipse UserFriend
did you ask on the JBoss forum/newsgroup? They should know best what's
necessary.

Regards,

--
Rüdiger Herrmann
http://eclipsesource.com

On 15.01.2010 11:33, Dmitry Egorov wrote:
> Hi, everybody!
> Sorry, for my poor English.
> To make call EJB3 from RAP:
> 1. Create plugin someYourEJB from existing jar with EJB's interfaces
> which you are about to call from RAP;
> 2. Create plugins from existing jar JBOSS/lib (included folder
> indorsed), JBOSS/client (name jbossClient2Rap), JBOSS/common/lib. I
> don't know which concrete jboss jar need :(
>
> 3. add plugin someYourEJB as a dependency to jbossClient2Rap. 4. add
> plugins created on step 1&2 as a dependency to your RAP plugin.
>
> Here's an example code for calling the EJB3' remote interface :
>
> Properties props = new Properties();
> props.put( Context.INITIAL_CONTEXT_FACTORY,
> "org.jnp.interfaces.NamingContextFactory" );
> props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
> // here you put JBoss AS server's address
> props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
> Context context = new InitialContext(props);
> context = new InitialContext( props );
> // get ejb3 Object obj = context.lookup("BookSession/remote");
> IBookSession bookSession = (IBookSession) obj;
> // call some business method List<Book> books = bookSession.list();
> ...
>
> Thats all
> Question:
> Please, list jboss really nessesary libraries.
>
>
Re: How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS [message #508283 is a reply to message #508279] Mon, 18 January 2010 04:55 Go to previous messageGo to next message
Eclipse UserFriend
Rüdiger, Charlie thanks for hints!
2009, we have developed helpdesk system (use GXT/JBoss), but set jboss libraries used in that project don't suite for RAP project. I think the right answer knows only RAP developers.
Re: How do I make remote calls to EJB3's deployed on Jboss 5.0.1 AS [message #508409 is a reply to message #508283] Mon, 18 January 2010 11:53 Go to previous message
Eclipse UserFriend
Hi everybody!
We find solution.
In folder path_to_jboss\client\ there is jbossall-client.jar,
in archive, in file readme.txt listed all essential libs for RAP client.
Thanks.
Regards,

Egorov Dmitry


Previous Topic:Plugin internationalization problem on Tomcat
Next Topic:runtime after close a dialog
Goto Forum:
  


Current Time: Sat Jul 12 08:47:35 EDT 2025

Powered by FUDForum. Page generated in 0.05120 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top