Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse Plugin connecting to and ebj3 server application.
Eclipse Plugin connecting to and ebj3 server application. [message #435418] Wed, 17 August 2005 18:29 Go to next message
Robert is currently offline RobertFriend
Messages: 45
Registered: July 2009
Member
Hi everyone,
I'm learning how to build eclipse plug ins (to eventually deploy in the
RCP environment) and am trying to connect to a server application
written using the new ejb3 standard.

i am using the following code to connect from my standalone application
(this code works in the application but not in the plugin)

HelloWorld hw;
try{
Context ctx = new InitialContext();
Object o = ctx.lookup(HelloWorld.class.getName());
hw = (HelloWorld)o;
}catch (NamingException e){
System.out.println("it fucked up!");
}
what i'm trying to do is move from a standalone application to an
eclipse plugin.

now from information that i got from another developer he believes
that "You need to set the thread classloader before your call
initialcontext (I think)."

My questions are: is this right? and how do i do this?

I have skimmed through "building commercial quality eclipse plug ins"
(Clayberg et.al.) but i think what im trying to do is beyond the scope
of this book. i would really appreciate it if someone has any tutorials
or examples that they would be willing to send me links to. i will post
the solution to this problem when i find a solution that works.

Thanks in advance for all your help.

Robert
Re: Eclipse Plugin connecting to and ebj3 server application. [message #435593 is a reply to message #435418] Fri, 19 August 2005 01:01 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 440
Registered: July 2009
Senior Member
With eclipse 3.1, it should not be necessary.
If you experience pb plz post here.

PaScaL

Robert wrote:
> Hi everyone,
> I'm learning how to build eclipse plug ins (to eventually deploy in the
> RCP environment) and am trying to connect to a server application
> written using the new ejb3 standard.
>
> i am using the following code to connect from my standalone application
> (this code works in the application but not in the plugin)
>
> HelloWorld hw;
> try{
> Context ctx = new InitialContext();
> Object o = ctx.lookup(HelloWorld.class.getName());
> hw = (HelloWorld)o;
> }catch (NamingException e){
> System.out.println("it fucked up!");
> }
> what i'm trying to do is move from a standalone application to an
> eclipse plugin.
>
> now from information that i got from another developer he believes
> that "You need to set the thread classloader before your
> call initialcontext (I think)."
>
> My questions are: is this right? and how do i do this?
>
> I have skimmed through "building commercial quality eclipse plug ins"
> (Clayberg et.al.) but i think what im trying to do is beyond the scope
> of this book. i would really appreciate it if someone has any tutorials
> or examples that they would be willing to send me links to. i will post
> the solution to this problem when i find a solution that works.
>
> Thanks in advance for all your help.
>
> Robert
Re: Eclipse Plugin connecting to and ebj3 server application. [message #435721 is a reply to message #435593] Mon, 22 August 2005 17:27 Go to previous messageGo to next message
Robert is currently offline RobertFriend
Messages: 45
Registered: July 2009
Member
I don't understand what you mean by: "it should not be necessary"

Pascal Rapicault wrote:
> With eclipse 3.1, it should not be necessary.
> If you experience pb plz post here.
>
> PaScaL
>
> Robert wrote:
>
>> Hi everyone,
>> I'm learning how to build eclipse plug ins (to eventually deploy in
>> the RCP environment) and am trying to connect to a server application
>> written using the new ejb3 standard.
>>
>> i am using the following code to connect from my standalone
>> application (this code works in the application but not in the plugin)
>> HelloWorld hw;
>> try{
>> Context ctx = new InitialContext();
>> Object o = ctx.lookup(HelloWorld.class.getName());
>> hw = (HelloWorld)o;
>> }catch (NamingException e){
>> System.out.println("it fucked up!");
>> }
>> what i'm trying to do is move from a standalone application to an
>> eclipse plugin.
>>
>> now from information that i got from another developer he believes
>> that "You need to set the thread classloader before your
>> call initialcontext (I think)."
>>
>> My questions are: is this right? and how do i do this?
>>
>> I have skimmed through "building commercial quality eclipse plug ins"
>> (Clayberg et.al.) but i think what im trying to do is beyond the
>> scope of this book. i would really appreciate it if someone has any
>> tutorials or examples that they would be willing to send me links to.
>> i will post the solution to this problem when i find a solution that
>> works.
>>
>> Thanks in advance for all your help.
>>
>> Robert
Re: Eclipse Plugin connecting to and ebj3 server application. [message #435987 is a reply to message #435418] Mon, 29 August 2005 04:20 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.vnws.com

You can search. It was asked and answered times.

Robert wrote:
> Hi everyone,
> I'm learning how to build eclipse plug ins (to eventually deploy in the
> RCP environment) and am trying to connect to a server application
> written using the new ejb3 standard.
>
> i am using the following code to connect from my standalone application
> (this code works in the application but not in the plugin)
>
> HelloWorld hw;
> try{
> Context ctx = new InitialContext();
> Object o = ctx.lookup(HelloWorld.class.getName());
> hw = (HelloWorld)o;
> }catch (NamingException e){
> System.out.println("it fucked up!");
> }
> what i'm trying to do is move from a standalone application to an
> eclipse plugin.
>
> now from information that i got from another developer he believes
> that "You need to set the thread classloader before your
> call initialcontext (I think)."
>
> My questions are: is this right? and how do i do this?
>
> I have skimmed through "building commercial quality eclipse plug ins"
> (Clayberg et.al.) but i think what im trying to do is beyond the scope
> of this book. i would really appreciate it if someone has any tutorials
> or examples that they would be willing to send me links to. i will post
> the solution to this problem when i find a solution that works.
>
> Thanks in advance for all your help.
>
> Robert
Previous Topic:How to access a class in my exported RCP application ?
Next Topic:RCP Product export ...
Goto Forum:
  


Current Time: Sun Dec 08 10:21:20 GMT 2024

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

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

Back to the top