I have some configurations in my application.properties file:
...
quarkus.datasource.url=jdbc:postgresql://...:5432/....
quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.username=user
quarkus.datasource.password=password
quarkus.hibernate-orm.database.generation=update
...
Run Code Online (Sandbox Code Playgroud)
I have a scheduler with a @Transactional method that takes a long time to finish executing:
@ApplicationScoped
class MyScheduler {
...
@Transactional
@Scheduled(every = "7200s")
open fun process() {
... my slow proccess goes here...
entityManager.persist(myObject)
}
}
Run Code Online (Sandbox Code Playgroud)
And then, the transactional method receives a timeout error like that:
2019-06-24 20:11:59,874 WARN [com.arj.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff0a000020:d58d:5cdad26e:81 in state RUN
2019-06-24 …Run Code Online (Sandbox Code Playgroud) 我想在我的Kotlin资源文件中包含一个依赖项。但是我不能。
我 编写了本教程:https : //quarkus.io/guides/rest-client-guide但是,为了开始该项目,我在项目中添加了扩展名“ kotlin”。
我的代码如下:
国家/地区
package org.acme.restclient
class Country {
var name:String? = null
var alpha2Code:String? = null
var capital:String? = null
var currencies:List<Currency>? = null
class Currency {
var code:String? = null
var name:String?= null
var symbol:String? = null
}
}
Run Code Online (Sandbox Code Playgroud)
StatesService.kt
package org.acme.restclient
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient
import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.PathParam
import javax.ws.rs.Produces
@Path("/v2")
@RegisterRestClient
interface CountriesService {
@GET
@Path("/name/{name}")
@Produces("application/json")
fun getByName(@PathParam("name") name: String): Set<Country>
}
Run Code Online (Sandbox Code Playgroud)
StatesResource.kt
package org.acme.restclient
import org.eclipse.microprofile.rest.client.inject.RestClient
import javax.inject.Inject …Run Code Online (Sandbox Code Playgroud) quarkus ×2