I'm working on outter database that could its password changed immediately. so I'm trying to set password from a property. or by registry at least (if it possible please attach any example or steps).
this is the mediator xml:
<dblookup>
<connection>
<pool>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/school_db</url>
<user>root</user>
<password>root</password>
</pool>
</connection>
<statement>
<sql><![CDATA[select * from students]]></sql>
<result column="grade" name="grade"/>
</statement>
</dblookup>
You can add the DBlookup mediator configurations to the registry. Refer to the following sample configuration [1].
<dblookup xmlns="http://ws.apache.org/ns/synapse">
<connection>
<pool>
<password key="conf:/repository/esb/password"/>
<driver key="conf:/repository/esb/driver"/>
<url key="conf:/repository/esb/url"/>
<user key="conf:/repository/esb/username"/>
</pool>
</connection>
</dblookup>
[1]-https://docs.wso2.com/display/EI660/DBLookup+Mediator+#d5782bec440d44ae9de95dc569d308ea
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.