• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

where to write the client code in websphere?

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends,

I am new to EJB's and working in IBM WebSphere. In want to write

1.sampleHome (home interface)
2.sample (bean interface)
3.sampleBean (bean class)
4.sampleClient (client code)

I created the first 3 by File|New|EJB project and placed these home interface,bean interface,bean class in the folder.

Sample EJB
EJB Modules
com
ibm
pbw
ejb
samplehome.java
samplebean.java
sample.java

Now my problem where to write this client code sampleclient.java
and how? (I mean File|New|??|??)?
After writing the client code , how to run the ejb?

Please remember that I am working in Websphere

bye
priya.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I take it by 'WebSphere' you actually mean WSAD (i.e. WebSphere Studio Application Developer) - which is the development tool of choice for WebSphere - the Application Server.

If you're using WSAD, go to File -> New -> Other -> J2EE -> Application Client Project to create a J2EE Client Container client. This will give you a client container deployment descriptor and easier access to JNDI and a few other services than a vanilla J2SE client.

cheers,

Dave.
 
Priya Sri
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Dave...

I will try it and let u know..

bye
priya
 
Priya Sri
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi dave,
I created an application client project as u said.
But the sampleclient.java is not able to import the home interface and bean interface...
i.e.,

import com.ibm.pbw.ejb.SimpleSessionHome;
import com.ibm.pbw.ejb.SimpleSession;

It is showing that it can't resolve com.ibm.pbw.ejb..
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a CLASSPATH problem. Do include ur root directory in CLASSPATH.
 
Priya Sri
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I didn't set the classpath..
Some code is automatically generated in the ".classpath"
This is as follows::

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var"
path="SERVERJDK_50_PLUGINDIR/jre/lib/rt.jar"
rootpath="SERVERJDK_SRCROOT" sourcepath="SERVERJDK_50_PLUGINDIR/src.jar"/>
<classpathentry kind="src" path="appClientModule"/>
<classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/j2ee.jar"/>
<classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/ivjejb35.jar"/>
<classpathentry kind="output" path="appClientModule"/>
</classpath>

How to set classpath..? What should I do now?
 
Dave Clark
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
right-cllick on the project, -> Properties -> Java Build Path.

another good option is Help Menu -> Help Contents -> ... ;-)

cheers,

Dave
 
pie. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic