[JBoss JIRA] (HIBERNATE-133) Function to detach Hibernate managed object.
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-133?page=com.atlassian.jira.plu... ]
Steve Ebersole closed HIBERNATE-133.
------------------------------------
Resolution: Rejected
1) You are using the wrong Jira as specified in the description for this project.
2) Plenty of ways to achieve this (OSiV, DTO, etc)
> Function to detach Hibernate managed object.
> --------------------------------------------
>
> Key: HIBERNATE-133
> URL: https://issues.jboss.org/browse/HIBERNATE-133
> Project: Hibernate Integration
> Issue Type: Feature Request
> Environment: Hibernate core.
> Reporter: jack luo
> Assignee: Steve Ebersole
> Labels: LazyInitializationException
>
> Currently, after retrieving data from database by hibernate like:
> User user = session.get(User.class, id);
> Then user object will become a hibernated managed object (po), if try to invoke any "lazy" property which haven't been initialized then it will throw an famous "LazyInitializationException". But so often, in web service or other scenarios, we need to serialize the object returned by Hibernate query, serializer doesn't know which properties are "lazy" field and haven't been initialized, then in serializing, it will throw an ""LazyInitializationException" exception which will stop the whole thing working. I found Session.evict(Object proxy) and Session.clear() seems might do the work that detaching PO from Hibernate, but it doesn't. I still got the error. After spent days searching in the internet, I found out there isn't any easy way to convert an PO to a POJO (detaching PO from Hibernate thoroughly), actually many people have implemented so many solutions like removing all the proxies from PO or copy PO to an POJO (DTO some people call it), any solution comes with cost of the system apparently. Well, if Hibernate can provide a simple function Hibernate.detach(Object obj) which will return an pure POJO then it will make our life so much easier. Check this link out, you see how many people have been struggling with this issue since 2008?
> http://www.mojavelinux.com/blog/archives/2006/06/hibernate_get_out_of_my_...
> My first try on Hibernate was back to 2007 and I found this issue, ending up copying properties of PO to a POJO to avoid "LazyInitializationException" exception. I absolute got the idea of lazy loading but DAO layer will pass the object to Business/View layer, I don't think they're responsible to check if every property's initialized by Hibernate before using it. It ok that un-initialized properties are null but throwing an exception is unacceptable. Requirement is quite straight forward, just want a pure POJO.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (HIBERNATE-142) @JoinColumn annotation doesn't fully support column names requiring double-quotes
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-142?page=com.atlassian.jira.plu... ]
Steve Ebersole commented on HIBERNATE-142:
------------------------------------------
This is the Jira project for the integration of Hibernate into JBoss/WildFly. For issues with Hibernate itself, use https://hibernate.atlassian.net/browse/HHH
You can report this issue there, or I'll "move" it when I get time.
> @JoinColumn annotation doesn't fully support column names requiring double-quotes
> ---------------------------------------------------------------------------------
>
> Key: HIBERNATE-142
> URL: https://issues.jboss.org/browse/HIBERNATE-142
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: Hibernate 4.2.4-Final
> Eclipse Juno
> J2EE 3.0 Web app
> Reporter: Paul Spinelli
> Assignee: Steve Ebersole
> Priority: Minor
>
> Due to the way an existing database schema has been configured, my JPA annotations (using Hibernate as my provider) all required that table names/column names be double-quoted:
> (e.g. String ID_COLUMN_NAME = "\"Id\"";)
> This does not pose a problem EXCEPT when using the @JoinColumn annotation (specifically, the 'referencedColumnName' attribute). This DOES NOT work (I get an error that the logical column name cannot be found):
> @JoinColumn(name=ID_COLUMN_NAME, referencedColumnName=ID_COLUMN_NAME)
> However, this DOES work:
> @JoinColumn(name=ID_COLUMN_NAME, referencedColumnName="`Id`")
> It seems that the 'name' attribute supports double-quotes while the 'referencedColumnName' attribute does not. Is there a reason it should not?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (WFLY-1721) Access log support
by Yoshimasa Tanabe (JIRA)
[ https://issues.jboss.org/browse/WFLY-1721?page=com.atlassian.jira.plugin.... ]
Yoshimasa Tanabe commented on WFLY-1721:
----------------------------------------
Hi, Tomaz. I have a question.
I did the following CLI command, but WildFly does not output the access log.
Any idea?
This is CLI history.
{code}
[standalone@localhost:9990 /] /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=undertow/server=default-server/host=default-host/setting=access-log:read-resource
{
"outcome" => "success",
"result" => {
"directory" => "${jboss.server.log.dir}",
"pattern" => "common",
"prefix" => "access_log.",
"rotate" => true,
"worker" => "default"
}
}
{code}
{code:xml|title=standalone.xml}
[...]
<subsystem xmlns="urn:jboss:domain:undertow:1.0">
<buffer-caches>
<buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>
</buffer-caches>
<server name="default-server">
<http-listener name="default" socket-binding="http" max-post-size="10485760"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<access-log/>
</host>
</server>
<servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">
<jsp-config/>
<persistent-sessions path="persistent-web-sessions" relative-to="jboss.server.data.dir"/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
</handlers>
</subsystem>
[...]
{code}
restarted WildFly, logged WARN log.
{code}
$ ./standalone.sh
[...]
13:47:13,929 WARN [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) service name: service jboss.undertow.server.default-server.host.default-host.access-log
[...]
{code}
and no access-log
{code}
ls $WILDFLY_HOME/standalone/log/
server.log server.log.2013-08-28
{code}
> Access log support
> ------------------
>
> Key: WFLY-1721
> URL: https://issues.jboss.org/browse/WFLY-1721
> Project: WildFly
> Issue Type: Feature Request
> Components: Web (Undertow)
> Affects Versions: 8.0.0.Alpha3
> Reporter: Tomaz Cerar
> Assignee: Tomaz Cerar
> Fix For: 8.0.0.Beta1
>
>
> We need to expose access log configuration trough management.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (HIBERNATE-142) @JoinColumn annotation doesn't fully support column names requiring double-quotes
by Paul Spinelli (JIRA)
Paul Spinelli created HIBERNATE-142:
---------------------------------------
Summary: @JoinColumn annotation doesn't fully support column names requiring double-quotes
Key: HIBERNATE-142
URL: https://issues.jboss.org/browse/HIBERNATE-142
Project: Hibernate Integration
Issue Type: Bug
Environment: Hibernate 4.2.4-Final
Eclipse Juno
J2EE 3.0 Web app
Reporter: Paul Spinelli
Assignee: Steve Ebersole
Priority: Minor
Due to the way an existing database schema has been configured, my JPA annotations (using Hibernate as my provider) all required that table names/column names be double-quoted:
(e.g. String ID_COLUMN_NAME = "\"Id\"";)
This does not pose a problem EXCEPT when using the @JoinColumn annotation (specifically, the 'referencedColumnName' attribute). This DOES NOT work (I get an error that the logical column name cannot be found):
@JoinColumn(name=ID_COLUMN_NAME, referencedColumnName=ID_COLUMN_NAME)
However, this DOES work:
@JoinColumn(name=ID_COLUMN_NAME, referencedColumnName="`Id`")
It seems that the 'name' attribute supports double-quotes while the 'referencedColumnName' attribute does not. Is there a reason it should not?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (WFLY-1385) Override default page-size-bytes in messaging subsystem configuration
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-1385?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-1385:
-----------------------------------------------
Miroslav Novak <mnovak(a)redhat.com> made a comment on [bug 920980|https://bugzilla.redhat.com/show_bug.cgi?id=920980]
This is not fixed in EAP 6.1.1.ER7 (HQ 2.3.5.Final).
@Jeff
Could you check whether your PR got to "eap" branch, please?
> Override default page-size-bytes in messaging subsystem configuration
> ---------------------------------------------------------------------
>
> Key: WFLY-1385
> URL: https://issues.jboss.org/browse/WFLY-1385
> Project: WildFly
> Issue Type: Enhancement
> Components: JMS
> Affects Versions: 8.0.0.Alpha1
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Priority: Minor
> Fix For: 8.0.0.Alpha2
>
>
> When HornetQ address-full-policy is switched from BLOCK to PAGE, the following exception is thrown during shutdown.
> {noformat}
> Exception:
> 09:48:05,247 WARN [org.hornetq.core.server] (MSC service thread 1-3) HQ222160: unable to send notification when broadcast group is stopped: java.lang.IllegalStateException: pageSize for address hornetq.notifications >= maxSize. Normally pageSize should be significantly smaller than maxSize, ms: 10485760 ps 10485760
> at org.hornetq.core.paging.impl.PagingStoreImpl.<init>(PagingStoreImpl.java:147) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
> at org.hornetq.core.paging.impl.PagingStoreFactoryNIO.newStore(PagingStoreFactoryNIO.java:98) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
> at org.hornetq.core.paging.impl.PagingManagerImpl.newStore(PagingManagerImpl.java:250) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
> {noformat}
> The standalone-full.xml configuration overrides the default address-setting's max-size-bytes (defaults to -1) to set it at 10 MiB.
> However, if the admin changes the address-full-policy from BLOCK to PAGE, it will conflict with the default value for page-size-bytes which is also 10MiB.
> To make the overridden standalone-full.xml more consistent, we can override page-size-bytes and set it to 2MiB (2097152 bytes). This change has no effect when the address-full-policy remains at BLOCK. When it is changed to PAGE, the resulting configuration will be coherent and there will be no exception thrown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (WFLY-1873) mod_cluster ISE on shutdown
by Paul Ferraro (JIRA)
[ https://issues.jboss.org/browse/WFLY-1873?page=com.atlassian.jira.plugin.... ]
Paul Ferraro commented on WFLY-1873:
------------------------------------
FYI - "java.lang.NoClassDefFoundError: org/wildfly/clustering/web/undertow/session/SessionManagerAdapterFactory" should no longer be an issue as of https://github.com/wildfly/wildfly/commit/7a5f4af3ddd5f41bde5d559780ff3d7...
> mod_cluster ISE on shutdown
> ---------------------------
>
> Key: WFLY-1873
> URL: https://issues.jboss.org/browse/WFLY-1873
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 8.0.0.Alpha4
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
> Fix For: 8.0.0.Beta1
>
>
> 16:45:28,305 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (MSC service thread 1-2) Error [MEM: MEM: Can't read node: {4}] sending command DISABLE-APP to proxy localhost/127.0.0.1:6666, configuration will be reset
> 16:45:28,315 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017521: Undertow AJP listener ajp suspending
> 16:45:28,319 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017520: Undertow AJP listener ajp stopped, was bound to /127.0.0.1:8009
> 16:45:28,336 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010418: Stopped Driver service with driver-name = h2
> 16:45:28,344 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017521: Undertow HTTP listener default suspending
> 16:45:28,349 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017520: Undertow HTTP listener default stopped, was bound to /127.0.0.1:8080
> 16:45:38,307 WARN [org.jboss.modcluster.ModClusterService] (MSC service thread 1-2) Failed to drain pending requests from context [org.wildfly.mod_cluster.undertow.UndertowContext@1906d941] within specified timeout: 10 seconds
> 16:45:38,308 WARN [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000004: Failure during stop of service jboss.undertow.deployment.default-host./clusterbench-ee6-web: java.lang.IllegalStateException
> at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
> at org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapter.onDeploymentStop(UndertowEventHandlerAdapter.java:137)
> at org.wildfly.extension.undertow.Host$2.invoke(Host.java:138)
> at org.wildfly.extension.undertow.UndertowService.fireEvent(UndertowService.java:168)
> at org.wildfly.extension.undertow.Host.unregisterDeployment(Host.java:135)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stopContext(UndertowDeploymentService.java:104)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stop(UndertowDeploymentService.java:94)
> at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2052) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
> at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2013) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
> at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (WFLY-165) It is possible to create broadcast group using non-existent connectors
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-165?page=com.atlassian.jira.plugin.s... ]
RH Bugzilla Integration commented on WFLY-165:
----------------------------------------------
Ivo Studensky <istudens(a)redhat.com> made a comment on [bug 952566|https://bugzilla.redhat.com/show_bug.cgi?id=952566]
Is there any plan to fix this in EAP?
> It is possible to create broadcast group using non-existent connectors
> ----------------------------------------------------------------------
>
> Key: WFLY-165
> URL: https://issues.jboss.org/browse/WFLY-165
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Fix For: 8.0.0.Alpha1
>
>
> It is possible to create broadcast group using non-existent connectors. It seems that validation is missing for add operation. This affects both CLI and Amin console, thus I suppose that problem is in underlying Management API.
> Example:
> 1. Creation of new group with non-existent connectors "ab" and "ba" will succeed
> [standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/broadcast-group=foo:add(socket-binding=default, connectors=[ab,ba])
> {
> "outcome" => "success",
> "response-headers" => {
> "operation-requires-reload" => true,
> "process-state" => "reload-required"
> }
> }
> 2. However if we try to change the value of connectors attribute to the very same value it will fail
>
> /subsystem=messaging/hornetq-server=default/broadcast-group=foo:write-attribute(name=connectors,value=[ab,bc])
> {
> "outcome" => "failed",
> "failure-description" => "JBAS011680: The broadcast group 'foo' defines reference to nonexistent connector 'ab'. Available connectors '[netty, in-vm, netty-throughput]'.",
> "rolled-back" => true,
> "response-headers" => {"process-state" => "reload-required"}
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (WFLY-1385) Override default page-size-bytes in messaging subsystem configuration
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-1385?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-1385:
-----------------------------------------------
Ivo Studensky <istudens(a)redhat.com> made a comment on [bug 920980|https://bugzilla.redhat.com/show_bug.cgi?id=920980]
Is there any plan to fix this in EAP?
> Override default page-size-bytes in messaging subsystem configuration
> ---------------------------------------------------------------------
>
> Key: WFLY-1385
> URL: https://issues.jboss.org/browse/WFLY-1385
> Project: WildFly
> Issue Type: Enhancement
> Components: JMS
> Affects Versions: 8.0.0.Alpha1
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Priority: Minor
> Fix For: 8.0.0.Alpha2
>
>
> When HornetQ address-full-policy is switched from BLOCK to PAGE, the following exception is thrown during shutdown.
> {noformat}
> Exception:
> 09:48:05,247 WARN [org.hornetq.core.server] (MSC service thread 1-3) HQ222160: unable to send notification when broadcast group is stopped: java.lang.IllegalStateException: pageSize for address hornetq.notifications >= maxSize. Normally pageSize should be significantly smaller than maxSize, ms: 10485760 ps 10485760
> at org.hornetq.core.paging.impl.PagingStoreImpl.<init>(PagingStoreImpl.java:147) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
> at org.hornetq.core.paging.impl.PagingStoreFactoryNIO.newStore(PagingStoreFactoryNIO.java:98) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
> at org.hornetq.core.paging.impl.PagingManagerImpl.newStore(PagingManagerImpl.java:250) [hornetq-server-2.3.0.CR1-redhat-1.jar:2.3.0.CR1-redhat-1]
> {noformat}
> The standalone-full.xml configuration overrides the default address-setting's max-size-bytes (defaults to -1) to set it at 10 MiB.
> However, if the admin changes the address-full-policy from BLOCK to PAGE, it will conflict with the default value for page-size-bytes which is also 10MiB.
> To make the overridden standalone-full.xml more consistent, we can override page-size-bytes and set it to 2MiB (2097152 bytes). This change has no effect when the address-full-policy remains at BLOCK. When it is changed to PAGE, the resulting configuration will be coherent and there will be no exception thrown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months