[jboss-user] [JCA/JBoss] - Re: How to connect my EJB to Firebird database?

g_zaspa do-not-reply at jboss.com
Tue Jan 30 03:42:33 EST 2007


OK, I try to run the simplest EJB working with Firebird DB. I'll try to describe you as short and as full as I can. If any other information is necessary, please, ask. 

I put firebird-ds.xml in deploy folder and corrected it. I seem it was deployed OK - in JMX console in jboss.jca part I see:

name='jaybird-2.1.1.rar',service=RARDeployment 
name='jboss-ha-local-jdbc.rar',service=RARDeployment 
...
name=DefaultDS,service=DataSourceBinding 
name=DefaultDS,service=LocalTxCM 
name=DefaultDS,service=ManagedConnectionFactory 
name=DefaultDS,service=ManagedConnectionPool 
name=FIrebirdDS,service=ConnectionFactoryBinding 
name=FIrebirdDS,service=ManagedConnectionFactory 
name=FIrebirdDS,service=ManagedConnectionPool 
name=FIrebirdDS,service=TxCM 
...

Then, I have a Java EE project with one EJB. I include persistence.xml in META-INF of the project, in which I write:

<?xml version="1.0" encoding="UTF-8"?>
<persistence-unit name="order" transaction-type="JTA">
<jta-data-source>java:/FIrebirdDS</jta-data-source>
</persistence-unit>

My EJB begins with:
@Stateless
@RemoteBinding(jndiBinding="ejb/Person")
public class PersonBean implements Person {

//@PersistenceContext EntityManager em;

When I deploy my .ear with this EJB, I get an error message in JBoss console with the last part:
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:name=FIrebirdDS,service=DataSourceBinding
State: NOTYETINSTALLED
Depends On Me:
persistence.units:ear=EJB3Test.ear,jar=EJB3Test.jar,unitName=order
persistence.units:ear=EJB3Test.ear,jar=EJB3Test.jar,unitName=order
persistence.units:ear=EJB3Test.ear,jar=EJB3Test.jar,unitName=order

But nevertheless .ear is deployed and I can reach my PersonBean EJB from a remote client on JNDI name and call it's business method. But as soon as I uncomment
//@PersistenceContext EntityManager em;
and redeploy my .ear, I cannot reach PersonBean EJB any more -
Object ref = context.lookup("ejb/Person"); in my client generates NameNotFoundException.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008166#4008166

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008166



More information about the jboss-user mailing list