Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Context lookup problem

843854Nov 26 2003 — edited Dec 16 2003
Hi all,

I'm usins a cloudscape XML like the following :
<?xml version=1.0" encoding="UTF-8"?>

<server>
	<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=CloudscapeDataSource">
	<depends optional-attribute-name="ManagedConnectionFactoryName">
		<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=CloudscapeDataSource">
			<attribute name="JndiName">jdbc/CloudscapeDB</attribute>
			<attribute name="ManagedConnectionFactoryProperties">
			
				<properties>
					<config-property-name="ConnectionURL" type="java.lang.String">jdbc:rmi://127.0.0.1:1088/jdbc:cloudscape:CloudscapeDB;create=true</config-property>
					<config-property-name="UserName" type="java.lang.String></config-property>
					<config-property-name="Password" type="java.lang.String></config-property>
				</properties>
			</attribute>
			
			<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
		</mbean>
	</depends>
	
	<depends optional-attribute-name="ManagedConnectionPool">
	
		<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=CloudscapeDataSource">

			<attribute name="MinSize">3</attribute>
			<attribute name="MaxSize">10</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>
	<attribute name="TransactionManager">java:/TransactionManager</attribute>
	
	<depends>jboss.jca:service=RARDeployer</depends>
	</mbean>
</server>
My problem is that I don't know what to set as the lookup parameter in :
DataSource ds =  (DataSource) context.lookup("what_to_set_here");
Plus, I've tried connecting by Class.forName, il works fine. But I'd like to solve that DataSource stuff...

Thanks for any help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2004
Added on Nov 26 2003
6 comments
142 views