Hi!

Blasius Lofi Dewanto wrote:
> Client part:
> - To deploy my client program that access the
>   jboss server I need these jboss' dependent libs
>   (from client directory)?
>   * deploy.jar

You don't "need" this. It's a tool that can be used to remotely deploy
beans into the server.

>   * jboss-client.jar
>   * jnp-client.jar
>   Can someone explain to me, what are these jars actually
>   doing? What is jnp?

jboss-client contains the stuff you need to be able to invoke jBoss
EJBObjects. JNP is our JNDI implementation.

>   Okay, you also need other jars like ejb, jndi, rmi,
>   jndi-prop file and so on but this also applies
>   for other EJB server.

Exactly.

> Server part:
> - ejb-jar.xml is the dd for all ejbs. This is
>   jboss independent.

Correct.

> - jboss.xml is typical jboss? one also puts the
>   jndi's names in this file for every beans.

Indeed.

> Database conn:
> I have 2 choices to use a database connection:
> 1. First I put my database connection, e.g. "Interbase"
>    in jboss.conf file and after this
>    I can access it through DataSourceImpl,
>    because jboss.conf properties map to the parametres of
>    org.jboss.jdbc.DataSourceImpl. Is this correct?

Yes.

>    For example: I can get the connection like this:
> 
>      InitialContext ic = new InitialContext();
>      DataSource ds = (DataSource)ic.lookup("Interbase");
>      con = ds.getConnection();
> 
>    But this is only interesting, if I want to write
>    BMP or session beans, right?

While possible, this is not recommended. You should use the
"java:comp/env" namespace as shown in the EJB 1.1 specification. This
will make it easier to port your beans.

>    I can't use this technique to write CMP beans.

Yes, you can access the database like this even if you use CMP. Using
CMP is in no way stopping you from using databases from within your
beans. It's just not necessary for common operations.

> 2. To write CMP beans I think I need JAWS jaws.xml, is
>    this correct? 

Correct.

> But I can't figure out, how I can
>    access more than one DB at one time? 

You can't.

> Because jaws.xml
>    only gives you one datasource, like this:
> 
>     <datasource>Hypersonic</datasource>
>     <type-mapping>Hypersonic SQL</type-mapping>
> 
> Thank's a lot for your helps!

Yes, currently JAWS is limited to one datasource. This might change in
the future. Join the JAWS mailing list (subscription info at jboss.org)
and voice your opinion about this.

> BTW.: Rickard, I cannot compile your client program because
> this file is missing: MBeanRegistration. This file is used
> by the main.java file
> 
> ...
> public class Main
>    implements MainMBean, MBeanRegistration
> ...
> 
> But it's okay, I just wrote my own simple client program and
> it works!

I am currently modifying the clients so it doesn't use JMX.

/Rickard

-- 
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to