Connecting Jain Slee to Database

171 views
Skip to first unread message

David Salvador

unread,
May 9, 2014, 4:58:38 AM5/9/14
to mobicent...@googlegroups.com
Hi guys,

I'm using Mobicents JAIN SLEE in my applications, and i need to connect my application to an external Database.

For what I've read, i need to use Mobicents JAIN SLEE JDBC RA right? 


1-  Where do i specify the ip, port, and JDBC connector to user (in my case I need postgreSQL) ? I've read somewhere in a post here that I need to configure an xml (deploy-config.xml) inside the "output" jar. Is that right ?

2-  When retrieving the RA interface and ACI factory, it is described as  


But i'm not quite sure what to put in RATYPE_ID and raEntityLinkName

3-  I've also read somewhere in another topic that there is also something realated to the ***-ds.xml located in $JBOSS_HOME/docs/examples/jca.


I guess I'm just a little confused with all this information, and could use some guidance.

Thanks in advance for all the help,
Cheers,
David Salvador

Sachin Parnami

unread,
May 9, 2014, 6:11:23 AM5/9/14
to mobicent...@googlegroups.com
Hi,

Please see Inline


On Friday, 9 May 2014 14:28:38 UTC+5:30, David Salvador wrote:
Hi guys,

I'm using Mobicents JAIN SLEE in my applications, and i need to connect my application to an external Database.

For what I've read, i need to use Mobicents JAIN SLEE JDBC RA right? 
[Sachin] Yes right, you can also use direct connectivity from SBB itself, though it is not advisable.


1-  Where do i specify the ip, port, and JDBC connector to user (in my case I need postgreSQL) ? I've read somewhere in a post here that I need to configure an xml (deploy-config.xml) inside the "output" jar. Is that right ?
 
[Sachin]  RA leverages the DataSource (ds) specified under JBoss, when you deploy the RA you may see it is using (1.0.0.FINAL/ra/src/main/resources/META-INF/resource-adaptor-jar.xml)
<config-property>
        	<config-property-name>DATASOURCE_JNDI_NAME</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>java:DefaultDS</config-property-value>
        </config-property>

Mapping to that is coming from (jboss-****\server\default\deploy\hsqldb-ds.xml)

 <jndi-name>DefaultDS</jndi-name>

2-  When retrieving the RA interface and ACI factory, it is described as  


But i'm not quite sure what to put in RATYPE_ID and raEntityLinkName
 
[Sachin]  RATYPE you can use it same as above which is coming from JDBC-RA-Type
public static final ResourceAdaptorTypeID RATYPE_ID = new ResourceAdaptorTypeID(
			"JDBCResourceAdaptorType", "org.mobicents", "1.0");

raEntityLink name should be same what you specify in your sbb-jar.xml while creating the ra entity

<resource-adaptor-type-binding>
			<resource-adaptor-type-ref>
				<resource-adaptor-type-name>
					JDBCResourceAdaptorType
				</resource-adaptor-type-name>
				<resource-adaptor-type-vendor>
					org.mobicents
				</resource-adaptor-type-vendor>
				<resource-adaptor-type-version>
					1.0
				</resource-adaptor-type-version>
			</resource-adaptor-type-ref>
			<activity-context-interface-factory-name>
				slee/ra/jdbc/1.0/acifactory
			</activity-context-interface-factory-name>
			<resource-adaptor-entity-binding>
				<resource-adaptor-object-name>
					slee/ra/jdbc/1.0/sbbinterface
				</resource-adaptor-object-name>
				<resource-adaptor-entity-link>
					JDBCRA
				</resource-adaptor-entity-link>
			</resource-adaptor-entity-binding>
		</resource-adaptor-type-binding>


3-  I've also read somewhere in another topic that there is also something realated to the ***-ds.xml located in $JBOSS_HOME/docs/examples/jca.
[Sachin] These are few examples avialable which you can use for your specific requirement.

David Salvador

unread,
May 9, 2014, 6:34:28 AM5/9/14
to mobicent...@googlegroups.com
Tnks a lot for the reply.

I think i understand it better now.
I'll try to successfully deploy JDBC RA and connect to my database. If i face any problems I'll post here.

Tnks for all the help,
David Salvador

David Salvador

unread,
May 9, 2014, 9:47:23 AM5/9/14
to mobicent...@googlegroups.com
Hi again,


there is: 

- jdbcActivity.executeQuery
-   jdbcActivity.executeUpdate

those methods are no longer available? i suppose they were substituted by jdbcActivity.execute(JdbcTask) right? 

is there any example available ?

Cheers,
David

Alexandre Mendonça

unread,
Jul 19, 2014, 8:54:55 PM7/19/14
to Mobicents Public

--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages