• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

MSSQL Database configuration with JBOSS-3.0.4

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB and JBOSS.
I am getting problem in configuration in MSSQL Database with JBOSS-3.0.4.I have to use it for BMP Bean.
I have done following steps for configuration.
1. delete the hsql*-service.xml file in the C:\jboss\jboss-3.0.4\server\default\deploy directory.

2. copy the mssql-service.xml file from the C:\jboss\jboss-3.0.4\docs\examples\jca directory
into C:\jboss\jboss-3.0.4\server\default\deploy

3. change the C:\jboss\jboss-3.0.4\server\default\config
a) standardjaws.xml


<type-mapping>MS SQLSERVER2000</type-mapping>

4. in the mssql-service.xml following changes:

<attribute name="ManagedConnectionFactoryProperties">
<config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://;DatabaseName=CABIN</config-property>
<config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config-property>
<!--set these only if you want only default logins, not through JAAS-->
<config-property name="UserName" type="java.lang.String">sa</config-property>
<config-property name="Password" type="java.lang.String"></config-property>

and also

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

5. in the C:\jboss\jboss-3.0.4\server\default\config dir

change the login-config.xml file

<application-policy name = "MSSQLDbRealm">
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=MSSQLDS</module-option>

and my jboss.xml is

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

and ejb-jar.xml file is
<?xml version="1.0" encoding="UTF-8"?>
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"

and in entity bean i have used following code to access database.
DataSource dataSource = (DataSource)initial.lookup("java:comp/env/jdbc/MSSQLDS");
but after that when i am deploying application it gives warning that : No resouce Manager found for java:/MSSQLDS and when i am
runing my application it gives me jdbc not bound error.
pls help me asap.
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JBoss Forum...
ketan modi
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At last i have solve my problem.
i have changed code in jboss.xml as below.
and now it is working ok.
This one time, at bandcamp, I had relations with a tiny ad.
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!