Generally, you can use classes that are not specifically session or entity
beans as helper classes in EJB.
However, the EJB container's class path must be modified to include the
libraries of these classes.  These classes must not violate EJB
specification.  And, the database connection must be obtained from the
container (that is, you must use a data base connection from the EJB
container pool).
So, for your application, it sounds like you need to change the code that
attaches to the database to retrieve a connection from the EJB pool.  And,
you need to modify the EJB server start script to append your library path
to the classpath for EJB.

Note: for best performance, the session bean activate routine should obtain
the database connection from the pool.  Then the bean can use the same
connection for all transactions until it is passivated.


-----Original Message-----
From: Errol CONS:Fernandes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 01, 1999 10:09 AM
To: [EMAIL PROTECTED]
Subject: Re: Best Solution Needed


I have a servlet that needs to enter a VIN Number to get back information.
The servlet passes the VIN Number entered to the session bean which in turn
would pass it to a Database transaction bean that was created in my prenious
App. The bean would connection to the Database and exec the query and via an
Object Factory would create respective business objects and return a Vector
of Bus Objects. When i tried to deploy my session bean and ran a verifier
with J2EE's Deployment tool. It could not find some of the classes.
How do i make the EJB know where the DB Bean and all its dependent classes
exist ?
Is it possible to do it this way ? i.e . To make a DB Conn call via a
Session Bean
Do i have to use an entity bean and modify my DB Bean. ( i.e. Make my DB
Bean like an Entitiy bean )

Thanks ,
Errol Fernandes ,
Netstar Group ,
[EMAIL PROTECTED]

>>> Rickard �berg <[EMAIL PROTECTED]> 12/01 9:50 AM >>>
Hi!

Errol CONS:Fernandes wrote:
> I have an existing system which uses sockets . i have a client and server
built into a framework. The framework is mainly transaction based. I have
the need to convert this whole application into EJB's and use an App Server.
> I tried using one of the functions from my previous app.
> Can someone clarify my doubts ?
>
> I have a function where i have to only read the data from the database. My
previous app had the ability to connect to a database and  create business
objects via an objectFactory that was built for the Application.
> >From my session bean , i tried to access my object factory but failed in
creating a Deployment Desriptor ,
> can i make a databse connection and retrieve data ?
> Or
> Do i have to create an entity bean and make the session bean call this
entity bean.

Both are viable options. Can you describe the exact nature of your
problems please?

regards,
  Rickard

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

===========================================================================
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