WildFly 9.0.2 + SQL Server + BIRT + JNDI handles changes to data sources when BIRT report is published

Source: Internet
Author: User
Tags sql server driver wildfly

First, the prerequisite requirements Description:

Recently, when I was working on a project, I used JBoss wildfly to publish the Birt report, which I added directly to the JDBC data source to connect to the database through the databases URL, user name, and password. Later, when deploying to a formal and test server, you need to modify the data source of the report file every time. So I think there's a way. How to configure in the report file and the service system, when the deployment no longer need to repeatedly modify the data source. At this point I thought of Jndi (Java naming and directory Interface, Java naming and directory interface).

By default the database URL to connect to the configuration is very simple, just download SQL Server driver, and then add to Birt Drive management, you can choose to through the drop-down box driver Class, which is no longer described in detail. When the Birt report is connected to the database, the database is connected through the databases URL first, if the connection is not over the Jndi connection.

  

Second, WildFly configuration Jndi

The default address for the Wildfly service Management console is Http://127.0.0.1:9990/console, and after linking because there are no users, you will be prompted to add users through Add-user.bat. Just follow the prompts to create the user and then log in to the console with the user you created.

There is a problem here, when creating the data source, you need to select the JDBC driver deployed in the system, then you need to put the driver jar package of your SQL Server database under LIB under the Web project. Also note that your driver package must be in JDBC-4 format, otherwise you will not see the driver you want to select under "Detected Driver". There is the last step, fill in the connection URL when the default URL to a more than one Microsoft, remove (jdbc:microsoft:sqlserver--jdbc:sqlserver). Other local configuration is relatively simple, do not repeat it.

  

  

  

Iii. publication of the report

Finally, remember the configured Jndi name and fill it in the JDBC configuration in the Birt report data source. From there, you can deploy the report directly to the system, where you can remove the user name and password, and the system will connect to the database directly through Jndi.

  

Finally put a SQL Server database connection driver jar file: https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=11774

WildFly 9.0.2 + SQL Server + BIRT + JNDI handles changes to data sources when BIRT report is published

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.