Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:33 Go to next message
Dmitry Egorov is currently offline Dmitry EgorovFriend
Messages: 11
Registered: July 2009
Location: Moscow
Junior Member
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 11:52 Go to previous messageGo to next message
Dmitry Egorov is currently offline Dmitry EgorovFriend
Messages: 11
Registered: July 2009
Location: Moscow
Junior Member
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 21:33 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
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 09:39 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
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 09:55 Go to previous messageGo to next message
Dmitry Egorov is currently offline Dmitry EgorovFriend
Messages: 11
Registered: July 2009
Location: Moscow
Junior Member
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 16:53 Go to previous message
Dmitry Egorov is currently offline Dmitry EgorovFriend
Messages: 11
Registered: July 2009
Location: Moscow
Junior Member
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: Thu Oct 10 20:39:21 GMT 2024

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

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

Back to the top