sorry..... I did'nt Think of it..... Please Excuse me....

Once again sorry all..
Thanks in advance
phani
----- Original Message -----
From: Juan Pablo Lorandi <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 4:30 PM
Subject: Re: Need some examples


> Phani, I don't want to discourage you, but what you're doing is not
> quite right...
>
> There are 3099 subscribers to this list, most of whom have taken the
> trouble of at least reading the spec carefully and also some other
> widely available literature. It is not a how-to list. Nobody here is
> supposed to help you with every step of the way. If every time you have
> a problem(looks like every 5 minutes) you'll be posting to the list,
> 3099 people are going to receive your message. 3099 people are going to
> have to open, read, and delete your message. Their time is just as
> valuable as yours, don't you think? And most won't care about it. So
> please, try to keep at least some of your posts private, only contacting
> those that are helping you.
>
> I know it's difficult when you're starting with EJBs. I hope you come
> thru it soon. But there is no need to hassle everybody else on this list
> during the process, wouldn't you agree? If everybody in the list posted
> a mail with every single compilation error they have, the list would be
> as useful as if it never existed.
>
> I'll be available to help, but only thru private mail. Please don't post
> publicly every 5 minutes or everytime you get a compiler/runtime error.
>
> Thanks in advance,
>
> Juan Pablo Lorandi
> Chief Software Architect
> Code Foundry Ltd.
> [EMAIL PROTECTED]
>
> Barberstown, Straffan, Co. Kildare, Ireland.
> Tel: +353-1-6012050  Fax: +353-1-6012051
> Mobile: +353-86-2157900
> www.codefoundry.com
>
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]] On Behalf Of phani
> > Sent: Wednesday, May 24, 2000 11:39 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Need some examples
> >
> >
> > hi,
> >    I created another method ejbFindByUserName(String aKey){}
> > but no luck... it is throwing a jit error... and retruns null
> > only... Thanks for help phani
> >
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, June 24, 2002 3:18 PM
> > Subject: Re: Need some examples
> >
> >
> > >
> > > Create a new find by method:
> > >   findByUsername(String username)
> > > The find by primaryKey is used by the container I think
> > >
> > > >  from:    phani <[EMAIL PROTECTED]>
> > > >  date:    Mon, 24 Jun 2002 09:57:47
> > > >  to:      [EMAIL PROTECTED]
> > > >  subject: Re: Need some examples
> > > >
> > > > Hi,
> > > >    I got the primary key class concept....
> > > >    If i have written a primary key class then i will use
> > that class
> > > > or i
> > can
> > > > use defalt java.lang.string class as primary key class ... right?
> > > >
> > > > Now my problem is i have a login table with two fields user_id and
> > password.
> > > > I am using Oracle8i DB and i am using BMP.
> > > >
> > > > I want to get the password from client by entering user_id.
> > > >
> > > > I coded Entity.java(Remote) EntityHome.java(Home) and
> > EnitytEJB.java(Bean)
> > > > and EnityClient.java (Client)
> > > >
> > > > But Client returning null value...
> > > >
> > > >
> > > > -----------
> > > > Entity.java
> > > >
> > > > import java.rmi.RemoteException;
> > > > import javax.ejb.EJBObject;
> > > > public interface Entity extends EJBObject {
> > > >     String getPassword()throws RemoteException;
> > > > }
> > > > ----------------
> > > > EntityHome.java
> > > >
> > > > import java.rmi.RemoteException;
> > > >
> > > > import javax.ejb.CreateException;
> > > > import javax.ejb.EJBHome;
> > > > import javax.ejb.FinderException;
> > > > public interface EntityHome extends EJBHome {
> > > >     public Entity findByPrimaryKey(String aKey)
> > > >         throws RemoteException, FinderException;
> > > > }
> > > > -----------
> > > > EntityEJB.java
> > > >
> > > > import javax.ejb.CreateException;
> > > > import javax.ejb.EntityBean;
> > > > import javax.ejb.EntityContext;
> > > > import javax.ejb.FinderException;
> > > > import java.sql.*;
> > > >
> > > > public class EntityEJB implements EntityBean {
> > > >
> > > >     /**
> > > >      * No argument constructor required by container.
> > > >      */
> > > >     private EntityContext ctx;
> > > >     public String password;
> > > >     public EntityEJB() {
> > > >     }
> > > >
> > > >     /**
> > > >      * Reference EJB specification 1.1 section 9.2.5
> > > >      */
> > > >     public String ejbFindByPrimaryKey(String aKey)
> > > >
> > > >         Connection con=null;
> > > >         PreparedStatement ps=null;
> > > >         ResultSet rs=null;
> > > >         String password=null;
> > > >         try{
> > > >             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> > > >
> > > >
> > con=DriverManager.getConnection("jdbc:odbc:vqi","system","manager");
> > > >         }catch(Exception e){System.out.println(e);}
> > > >         try{
> > > >         ps=con.prepareStatement("select password from
> > system.login
> > > > where user_id=?");
> > > >         ps.setString(1,aKey.trim());
> > > >         rs=ps.executeQuery();
> > > >         while(rs.next())
> > > >         {
> > > >          password=rs.getString("password");
> > > >   System.out.println(password);//it is printing the password
> > > >         }
> > > >   con.close();
> > > >         }catch(Exception e){System.out.println(e);}
> > > >         return aKey;
> > > >     }
> > > >
> > > >     /* Methods required for EntityBean interface. EJB 1.1 section
> > > > 9.4 */
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#ejbActivate()
> > > >      */
> > > >     public void setEntityContext(EntityContext context){
> > > >         this.ctx=context;
> > > >     }
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#unsetEntityContext()
> > > >      */
> > > >     public void unsetEntityContext(){
> > > >
> > > >     }
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#ejbActivate()
> > > >      */
> > > >     public void ejbActivate() {
> > > >     }
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#ejbPassivate()
> > > >      */
> > > >     public void ejbPassivate() {
> > > >     }
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#ejbLoad()
> > > >      */
> > > >     public void ejbLoad() {
> > > >     }
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#ejbStore()
> > > >      */
> > > >     public void ejbStore() {
> > > >     }
> > > >
> > > >     /**
> > > >      * @see javax.ejb.EntityBean#ejbRemove()
> > > >      */
> > > >     public void ejbRemove() {
> > > >     }
> > > >
> > > >     public java.lang.String getPassword() {
> > > >       System.out.println(password);
> > > >         return password;
> > > >     }
> > > >
> > > > }
> > > > ----------
> > > > EnityClient
> > > > import javax.naming.*;
> > > > import java.util.*;
> > > > public  class  EntityClient
> > > > {
> > > >    public static void main(String  args[])
> > > >    throws  Exception
> > > >    {try{
> > > >      System.out.println(" Please wait....");
> > > >   Properties p=new Properties();
> > > >
> > > >
> > p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3Initial
> > ContextFactory
> > > > ");
> > > > p.put(Context.PROVIDER_URL,"t3://localhost:7001");
> > > >  Context  ctx=new InitialContext(p);
> > > >  EntityHome  h=(EntityHome)ctx.lookup("bmpBean");
> > > >  Entity  robj=h.findByPrimaryKey("phani");
> > > > System.out.println(robj.getPassword());
> > > > }catch(Exception e){System.out.println(e);}
> > > >   } // main
> > > >   } // end of EmpClient
> > > >
> > > > Can some one tell me where i went wrong?
> > > > I have major doubt regarding to my findbyprimarykey() method
> > overiding.....
> > > > what i have done was right?
> > > >
> > > > Can some one point me in right direction?
> > > >
> > > > Thanks in advance
> > > > phani
> > > >
> > > > ----- Original Message -----
> > > > From: Ashwani Kalra <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Monday, June 24, 2002 1:42 PM
> > > > Subject: Re: Need some examples
> > > >
> > > >
> > > > > You need primary key class when there are more than one
> > field(composite
> > > > > key). Check your deployment descriptor.  For the
> > <prim-key-class>
> > element.
> > > > > ----- Original Message -----
> > > > > From: "phani" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Monday, June 24, 2002 1:35 PM
> > > > > Subject: Re: Need some examples
> > > > >
> > > > >
> > > > > > Hi vellosa,
> > > > > > Thanks for the info.
> > > > > >
> > > > > > I checked the sample dir. But I have read that the
> > entity bean
> > > > > > must
> > > > > require
> > > > > > an Primary key class.
> > > > > > But i don't find any primary key class in the
> > > > > > samples/examples/ejb/basic/beanManaged
> > > > > > I have account.java(Remote) accountHome.java(Home)
> > accountBean.java(EJB)
> > > > > and
> > > > > > client.java but where is Primary Key class.
> > > > > >
> > > > > > Thanks for the help
> > > > > > phani
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: <[EMAIL PROTECTED]>
> > > > > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > > > > Sent: Monday, June 24, 2002 1:24 PM
> > > > > > Subject: Re: Need some examples
> > > > > >
> > > > > >
> > > > > > > Hi Phani,
> > > > > > >
> > > > > > > I am using WebLogic 6.1 and there in the directory:
> > > > > > >
> > > > > > >   C:\bea\wlserver6.1\samples\examples
> > > > > > >
> > > > > > > I have a whole set of examples for everything you
> > could ever
> > > > > > > need
> > to
> > > > do
> > > > > on
> > > > > > WebLogic, well quite a bit anyway. There are examples
> > of EJB 1.1
> > > > > > and
> > 2.0
> > > > > > BMP, CMP and even Message Driven Beans. I'm sure you must have
> > something
> > > > > > similar under your 6.0 instalation?
> > > > > > >
> > > > > > > Regards
> > > > > > > IV
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >  from:    phani <[EMAIL PROTECTED]>
> > > > > > > >  date:    Mon, 24 Jun 2002 08:41:58
> > > > > > > >  to:      [EMAIL PROTECTED]
> > > > > > > >  subject: Re: Need some examples
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > >   I am new bie to ejb and i am messed with
> > deploying entity
> > beans on
> > > > > > WL6.0
> > > > > > > >
> > > > > > > >    I need some basic examples for entity beans
> > (both cmp and
> > bmp)
> > > > > > specific to weblogic 6.0 so that i can deploy and run without
> > > > > > any modifications.
> > > > > > > >
> > > > > > > >  Are there any examples available with WL6.0 specific xml
> > > > > > > > files? I searched the web but no luck.
> > > > > > > >
> > > > > > > > Thanks for any help
> > > > > > > > phani
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > http://www.amazon.co.uk/exec/obidos/redirect-home?tag=vellosco
> > uk-21&placemen
> > > > > > t=home_multi.gif&site=amazon
> > > > > >
> > > > > >
> > > > >
> > > >
> > ==============================================================
> > =============
> > > > > > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include
> > > > > > in
> > the
> > > > > body
> > > > > > of the message "signoff EJB-INTEREST".  For general
> > help, send
> > > > > > email
> > to
> > > > > > [EMAIL PROTECTED] and include in the body of the message
> > > > > > "help".
> > > > > >
> > > > >
> > > > >
> > > >
> > ==============================================================
> > =============
> > > > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in
> > > > > the
> > > > body
> > > > > of the message "signoff EJB-INTEREST".  For general help, send
> > > > > email
> > to
> > > > > [EMAIL PROTECTED] and include in the body of the message
> > > > > "help".
> > > >
> > > >
> > ==============================================================
> > =============
> > > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in
> > > > the
> > body
> > > > of the message "signoff EJB-INTEREST".  For general help,
> > send email
> > > > to [EMAIL PROTECTED] and include in the body of the message
> > > > "help".
> > > >
> > >
> > >
> > >
> > >
> > http://www.amazon.co.uk/exec/obidos/redirect-home?tag=vellosco
> uk-21&placemen
> t=home_multi.gif&site=amazon
>
> ========================================================================
> ===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body of the message "signoff EJB-INTEREST".  For general help, send
> email to [EMAIL PROTECTED] and include in the body of the message
> "help".
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to