Eclipse-Class-Decompiler | Eclipse Class Decompiler integrates JD Jad | IDE Plugin library
kandi X-RAY | Eclipse-Class-Decompiler Summary
kandi X-RAY | Eclipse-Class-Decompiler Summary
Eclipse Class Decompiler is a plug-in for the Eclipse platform. It integrates JD, Jad, FernFlower, CFR, Procyon seamlessly with Eclipse, allows you to display all the Java sources during your debugging process, even if you do not have them all, and you can debug these class files without source code directly.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create the field editors
- Gets the adapter s set
- Gets a list of adapters for a given adaptable object
- Get the adapter for the given adaptable object
- Compute a stack map frame for the given method body
- Pushes a new frame
- Compute the delta between two frames
- Sets a local local variable
- Visit a binary expression
- Visits a UnaryExpression node
- Visits a binary expression
- Remove unboxing for an argument
- Returns the default values
- Returns a string representation of the variable declaration
- Visits a method declaration
- Rewrite a switch statement
- Return the description of the method
- Visit an InvocationExpression
- Find source for given type
- Convert the bytecode to a text buffer
- Visit a try catch block
- Visits a type definition
- Visit a switch statement
- Exports the graph to a file
- Parses a description and returns the matched nodes
- Selects the best matching method
Eclipse-Class-Decompiler Key Features
Eclipse-Class-Decompiler Examples and Code Snippets
Community Discussions
Trending Discussions on Eclipse-Class-Decompiler
QUESTION
I have a Spring Boot application that connects to two separate databases. All works fine (I followed the steps in the docs and a tutorial), although in order to customize the Tomcat JDBC connection pool settings, I had to manually configure it (because by defining multiple data sources, the Boot auto-configuration is ignored, and Spring Boot does not read the tomcat-specific properties anymore from application.properties).
When I use a debugger during the configuration of the two DataSources, I see that both org.apache.tomcat.jdbc.pool.DataSource instances have the same connection pool in the DataSource.PoolProperties["name"] entry. See below screenshots in the debugger, each dataSource() method is configured in a separate configuration class. Notice that the same Connection Pool is defined.
However, from what I see using jConsole + tomcat JMX, there is only one connection pool, which has the primary database details configured (URL, credentials, see below).
Because of the multiple layers of abstraction inside Spring, it is difficult for me to debug this. I have the Eclipse Class Decompiler plugin, which I normally use to see the Spring logic, but in this case, the initialization code for the data sources happens when the beans are registered, not when they are actually used by Spring Boot to set the data sources up.
Bottom line, can you help me understand:
- why there is only one connection pool
- how can I use two connection pools, one for each data source
- where in the Spring code to look at for more details of how this works
For the 2nd question, there is a somewhat related question, but with no answer. There is another question which is a false positive, and another one which is related to Spring, not Spring Boot, so please don't report this as dupe.
...ANSWER
Answered 2019-Oct-15 at 09:26- Generally,
DataSource
interface is implemented by pooling libraries to be compatible with frameworks and JavaEE code as universal JDBC connection source which actually works with DB driver.
SpringBoot autoconfiguration has DataSource initializers for popular pooling libraries. Full list you can find in Spring sources.
That means all you need to leverage pooling in your project is to add pooling library likeHikari
as dependency and configurespring.datasource.*
params. Spring will create and configure single poolingDataSource
which can be autowired in your code. - Another story if you need to create more than one
DataSource
. SpringBoot autoconfiguration heavily use@ConditionalOnMissingBean
annotation to determine cases when default behaviour can be applied. Spring can't create two default datasources because it's ambiguous which one should be used.
You can find this inspring-boot-autoconfugire
module: Spring startsDataSource
initialisation logic only if there's no bean of this type in context.
To use several pools you have to define your ownBean
for each pooled DB connection. Spring will notice yourDataSource
and won't create pool internally. Here's an example. - You can find more details about
DataSource
autoconfiguration here
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Eclipse-Class-Decompiler
Click on "Help > Install New Software...",
Click on button "Add..." to add an new repository,
Enter name as "Eclipse Class Decompiler Update Site" and enter location as "http://raw.githubusercontent.com/cnfree/eclipse/master/decompiler/update/", then click on button "OK",
Check "Eclipse Class Decompiler",
Next, next, next... and restart.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page