BERDAI Adil

Greenhorn
+ Follow
since Mar 08, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by BERDAI Adil

Congrats will ! and thanks for sharing your experience ..
12 years ago
Congratulations Youssef ! "alf mabrouk" ..
12 years ago
Congratulations !
12 years ago
Hi, I used it only for component diagram, gor the rest I used star uml that I found nice and practical..both allow exporting diagrams in jpg format. Good luck
I got it ! It seems that the datasource provided by jboss in standalone mode (using JUnit for tests) is incompatible. It's also not recommanded by jboss..
That's what I did !
When I depoloyed my application on the server, the application worked well..
So, handling Cursor is compatible with this kind of Datasources except for standalone application
thank you

Adil
16 years ago
it's releated to the topic :

topic

Thank you a lot
[ March 14, 2007: Message edited by: BERDAI Adil ]
17 years ago
yes ! it's a good idea but I have to respect an architecture proposed to me..where DAO layer call the datasource in order to perfom some CallabaleStatements..
17 years ago
Thank you for your reply
What I 'm doing is to try to retrieve a datasource from a stateless EJB 2.0 in Jboss 4.0.5.GA.


public class MyDatasourceBean implements SessionBean {

/**
* Session context
*/
private SessionContext sessionCtx;

/**
* Default constructor
*
*/
public MyDatasourceBean() {


}

/**
* @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
*/
public void setSessionContext(SessionContext sessionCtx) throws EJBException, RemoteException {
this.sessionCtx = sessionCtx;
}

public void ejbActivate() throws EJBException {

}

public void ejbPassivate() throws EJBException {
}

public void ejbRemove() throws EJBException {
}


public void ejbCreate() {
}

/**
*
* @param dataSourceName
* @throws RemoteException
*/
public DataSource giveDatasource(String dataSourceName) throws RemoteException {

DataSource dataSource;
try {
Context ctx = new InitialContext();

dataSource = (DataSource) ctx.lookup(dataSourceName.trim());
System.out.println("Got datasource: " + dataSource);

} catch (NamingException ne) {
ne.printStackTrace();
throw new RemoteException("Exception while working with datasource",ne);
}
return dataSource;
}

}


public interface MyDatasourceHome extends EJBHome {



public MyDatasourceRemote create() throws RemoteException, CreateException;

}



public interface MyDatasourceRemote extends EJBObject {



public DataSource giveDatasource(String dataSourceName) throws RemoteException;

}




If I let the default jboss-service.xml, I get this trace ..

org.jboss.util.NestedSQLException: Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!); - nested throwable: (Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
at com.solutions.auto.persistence.connection.DBManager.getConnection(DBManager.java:133)
at com.solutions.autol.persistence.dao.DaoFactory.createConnection(DaoFactory.java:57)
at com.solutions.auto.persistence.indicator.IndicatorDaoImpl.selectIndicators(IndicatorDaoImpl.java:66)
at com.solutions.auto.persistence.indicator.TestIndicatorDaoImpl.testSelectIndicators(TestIndicatorDaoImpl.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!)
at org.jboss.resource.JBossResourceException.rethrowAsResourceException(JBossResourceException.java:61)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.getCM(BaseConnectionManager2.java:881)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
... 19 more
Caused by: java.lang.IllegalStateException: No 'jboss' MBeanServer found!


Thank you for your help
17 years ago
I said something LIKE that..of course by changing the name of Datasource and IP, login and paswword..

I had to configure jboss-service.xml beacause it makes the following trace :

[13/mars/2007 09:20:17:187] DEBUG: com.solutions.auto.persistence.connection.DBManager.<init> : Begin DBManager()
[13/mars/2007 09:20:17:906] DEBUG: org.jboss.security.SecurityAssociation.<clinit> : Using ThreadLocal: false
[13/mars/2007 09:20:18:234] DEBUG: com.solutions.auto.persistence.connection.DBManager.<init> : End DBManager()
[13/mars/2007 09:20:18:234] DEBUG: com.solutions.auto.persistence.connection.DBManager.getConnection : Begin getConnection()
[13/mars/2007 09:20:18:265] DEBUG: org.jboss.util.NestedThrowable.getBoolean : org.jboss.util.NestedThrowable.parentTraceEnabled=true
[13/mars/2007 09:20:18:265] DEBUG: org.jboss.util.NestedThrowable.getBoolean : org.jboss.util.NestedThrowable.nestedTraceEnabled=false
[13/mars/2007 09:20:18:265] DEBUG: org.jboss.util.NestedThrowable.getBoolean : org.jboss.util.NestedThrowable.detectDuplicateNesting=true
org.jboss.util.NestedSQLException: Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!); - nested throwable: (Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
at com.solution.auto.persistence.connection.DBManager.getConnection(DBManager.java:129)
at com.solutions.auto.persistence.dao.DaoFactory.createConnection(DaoFactory.java:57)
at com.solutions.auto.persistence.indicator.IndicatorDaoImpl.selectIndicators(IndicatorDaoImpl.java:66)
at com.solutions.auto.persistence.indicator.TestIndicatorDaoImpl.testSelectIndicators(TestIndicatorDaoImpl.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!)
at org.jboss.resource.JBossResourceException.rethrowAsResourceException(JBossResourceException.java:61)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.getCM(BaseConnectionManager2.java:881)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
... 19 more
Caused by: java.lang.IllegalStateException: No 'jboss' MBeanServer found!
at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:122)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.getCM(BaseConnectionManager2.java:875)
... 21 more
[13/mars/2007 09:20:18:281] ERROR: com.solutions.auto.persistence.connection.DBManager.getConnection : Fail to create connecxion Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!); - nested throwable: (Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!))
java.lang.NullPointerException
at com.solutions.auto.persistence.connection.DBManager.getConnection(DBManager.java:154)
at com.solutions.auto.persistence.dao.DaoFactory.createConnection(DaoFactory.java:57)
at com.solutions.autol.persistence.indicator.IndicatorDaoImpl.selectIndicators(IndicatorDaoImpl.java:66)
at com.solutions.auto.persistence.indicator.TestIndicatorDaoImpl.testSelectIndicators(TestIndicatorDaoImpl.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
[13/mars/2007 09:20:18:281] ERROR: com.solutions.auto.persistence.indicator.IndicatorDaoImpl.selectIndicators : Application exception : null Indicator Management General Exception
com.solutions.auto.persistence.exceptions.AppliPersistenceException: Application exeption
at com.solutions.autol.persistence.indicator.IndicatorDaoImpl.selectIndicators(IndicatorDaoImpl.java:116)
at com.solutions.auto.persistence.indicator.TestIndicatorDaoImpl.testSelectIndicators(TestIndicatorDaoImpl.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
[13/mars/2007 09:20:18:281] ERROR: com.solutions.auto.persistence.indicator.TestIndicatorDaoImpl.testSelectIndicators : Application Error : message : null Indicator Management General Exception



My xxx-ds.xml is configured as follows :

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<datasources>
<local-tx-datasource>
<jndi-name>MyDS</jndi-name>
<!-- Using global namespace. In this case, JNDI name of Oracle DS is OracleDS -->
<use-java-context>false</use-java-context>

<connection-url>jdbc racle:thin:@180.162.10.10:1521 rcl</connection-url>

<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>mylogin</user-name>
<password>mypassword</password>

<connection-property name="char.encoding">UTF-8</connection-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
</local-tx-datasource>

</datasources>

and the jboss-service.xml that I want to use :

<server>
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=MyDS">



<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=MyDS">

<attribute name="JndiName">MyDS</attribute>

<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc racle:thin:@180.162.10.10:1521 rcl</config-property>
<config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
<config-property name="UserName" type="java.lang.String">mylogin</config-property>
<config-property name="Password" type="java.lang.String">mypassword</config-property>
</properties>

</attribute>

<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>

<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=MyDS">

<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>

<attribute name="Criteria">ByContainer</attribute>
</mbean>

</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>

<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>

<attribute name="TransactionManager">java:/TransactionManager</attribute>


<depends>jboss.jca:service=RARDeployer</depends>

</mbean>

</server>

I'm using Oracle 10g
Have you any idea about retreiving a Datasource from my getConnection() method ?

Thank you in advance
Adil
[ March 13, 2007: Message edited by: BERDAI Adil ]
17 years ago
I'm waiting for any kind help from you !
17 years ago
Any Idea !

I think that I should configure somthing in the jboss-service.xml file
somethinh like this :

<server>
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=OracleDS">


<!-- Include a login module configuration named OracleDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:

<application-policy name = "OracleDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
</login-module>
</authentication>
</application-policy>

NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!--uncomment out this line if you are using the OracleDbRealm above
<attribute name="SecurityDomainJndiName">OracleDbRealm</attribute>
-->

<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=OracleDS">

<attribute name="JndiName">AUTOLIMITSDS</attribute>

<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc racle:thin:@192.168.10.150:1521 rcl</config-property>
<config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
<config-property name="UserName" type="java.lang.String">plm</config-property>
<config-property name="Password" type="java.lang.String">plm</config-property>
</properties>

</attribute>

<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>

<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=OracleDS">

<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>

</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>

<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>

<attribute name="TransactionManager">java:/TransactionManager</attribute>

<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>

</mbean>

</server>

it gives an error telling that they don't find the file : org.jboss.resource.connectionmanager.LocalTxConnectionManager !
I have the 4.0.5.GA version
Thank you for help
17 years ago
Hi !

I'm deploying a simple stateless EJB under jboss 4.0.5 GA

it's throws this following trace :

org.jboss.util.NestedSQLException: Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!); - nested throwable: (Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
at com.solutions.auto.persistence.connection.DBManager.getConnection(DBManager.java:129)
at com.solutions.auto.persistence.dao.DaoFactory.createConnection(DaoFactory.java:57)
at com.solutions.auto.persistence.indicator.IndicatorDaoImpl.selectIndicators(IndicatorDaoImpl.java:66)
at com.solutions.auto.persistence.indicator.TestIndicatorDaoImpl.testSelectIndicators(TestIndicatorDaoImpl.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: Problem locating real ConnectionManager: jboss.jca:service=LocalTxCM,name=MyDS; - nested throwable: (java.lang.IllegalStateException: No 'jboss' MBeanServer found!)
at org.jboss.resource.JBossResourceException.rethrowAsResourceException(JBossResourceException.java:61)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.getCM(BaseConnectionManager2.java:881)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
... 19 more
Caused by: java.lang.IllegalStateException: No 'jboss' MBeanServer found!
at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:122)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.getCM(BaseConnectionManager2.java:875)
... 21 more


I get this Exception when trying to get java.sql.Connection from my datasource provided by an EJB :

System.setProperty("java.security.policy", "client.policy");
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
Properties env = new Properties();
env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "180.162.10.10:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");


Context ctx = new InitialContext(env);
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}

Object obj = ctx.lookup("MyDatasourceBean");
MyDatasourceHome home = (MyDatasourceHome) PortableRemoteObject.narrow(obj,MyDatasourceHome.class);
MyDatasourceRemote myDatasourceRemote = home.create();


ds= myDatasourceRemote.giveDatasource("MyDS");



Could you help me please ! thank you in advance

Adil
17 years ago
Thank you very much
The connection provided by datasource descriptor in jboss is incompatible with Cursor handling. If you use a simple request (with PreparedStatement or Statement), there is no difference. Meanwhile, if you handle or retrieve cursors from stored procedures, then this connection which is just a proxy is not really very compatible with ..you'd rather use EJB to provide a real Datasource
I think that EJBs will simplify things even if their deployement is a little bit complicated

Thank you
17 years ago