-
1. Re: jboss missing Database
adrian.brock Dec 17, 2002 10:56 AM (in response to mille)What jndi-names are you using.
i.e. oracle-service.xml, your code, jboss.xml
By default it uses java:/DefaultDS which is
hypersonic unless you changed it.
Use the jmx console (version dependent)
http://localhost:8082/ or http://localhost:8080/jmx-console
click on the hypersonic service and then
startdatabasemanager, you will probably see your
data?
Regards,
Adrian -
2. Re: jboss missing Database
mille Dec 19, 2002 2:48 PM (in response to mille)Hello Adrian! Sorry, but by your hint I just realized that things are not simple as I thought... I was thinking that it is possible to specify all what is needed in deployment descriptors (ejb-jar.xml and ejb-inprise.xml). I DIDN'T KNOW AT ALL about existence of that administrator web view of JBoss, and probably I have to study it first. Is there any free tutorial about using it, and configuring JBOSS? If there is some shorter way to make JBOSS use some other DB than hypersonic (for example Oracle 8.1.6) could you explain it? I didn't understand you question about JNDI names. I just reference ejb-s by simply name, like:
...
Context ctx = new InitialContext();
Object ref = ctx.lookup("Bean1");
Bean1Home = (Bean1Home) PortableRemoteObject.narrow(ref, Bean1Home.class);
...
and it works for B.A.S. 4.5.1 as I said before.
Related part of ejb-jar.xml is:
...
<ejb-name>Bean1</ejb-name>
ejbmodul.Bean1Home
ejbmodul.Bean1
<ejb-class>ejbmodul.Bean1Bean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
False
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
...
<primkey-field>id</primkey-field>
<resource-ref>
<res-ref-name>jdbc/DataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Related part of ejb-inprise.xml is:
...
<inprise-specific>
<enterprise-beans>
...
<ejb-name>Bean1</ejb-name>
<bean-home-name>Bean1</bean-home-name>
<resource-ref>
<res-ref-name>jdbc/DataSource</res-ref-name>
<jndi-name>DataSource</jndi-name>
</resource-ref>
<cmp-info>
<database-map>
BEAN1
</database-map>
<method-signature>findAll()</method-signature>
<where-clause />
<load-state>True</load-state>
</cmp-info>
...
</enterprise-beans>
<datasource-definitions>
<jndi-name>DataSource</jndi-name>
jdbc:oracle:thin:@_url:_port:_SIDname
_user
_password
<isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
<driver-class-name>oracle.jdbc.driver.OracleDriver</driver-class-name>
</datasource-definitions>
</inprise-specific>
Is that inprise-specific tag means that ejb-inprise.xml is specific for Borland Application server? What should be JBoss substitution for that?
regards,
Vlada -
3. Re: jboss missing Database
adrian.brock Dec 19, 2002 10:58 PM (in response to mille)Do you have the quickstart guide?
Click on documentation on the left.
In jboss it is done in two steps.
1) Configure the oracle service
add the driver to server/default/lib and
put oracle-service.xml in server/default/deploy
change oracle-service.xml to give your url, user/password
2) Configure the resource-refs and resource-managers
in jboss.xml
An alternative would be to remove hypersonic and
bind oracle as DefaultDS
Regards,
Adrian