[JBoss jBPM] - Can we save custom variables in a ProcessDefinition
by simonbaker
Is there any facility for saving custom data in a ProcessDefinition?
For example, I'd like to save the name or pathname of the processdefinition.xml file used to deploy the ProcessDefinition; also the name/path of the gpd.xml file.
For our particular use, which is to read the file at some later point, I have seen techniques for saving FileDefinitions to a ProcessDefinition, which really reads an input stream and saves all the data in the Hibernate JBPM database, as far as I can tell.
That is a possible solution, but sometimes just the gpd.xml file is changed without changing the processdefinition.xml file, and we'd like to deliver it just by copying it over the old one, rather than a special process to replace the FileDefinition involving a lot of code and a UI. Then we can read the file as needed with normal Java file I/O if we can retrieve the name/path from the ProcessDefinition.
Is there some simple way to just store and retrieve a few strings in the ProcessDefinition?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107628#4107628
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107628
18 years, 6 months
[JBoss Seam] - Re: maintain state between pages and seam managed persistenc
by nguyenhaugiang
Thank you for your reply,
but let me make it clear,
P1 -> P2 -> P3 ...
P1, P2, P3 are bigger than pages of wizard, they are units of process.
P1 may be order list page,
P2 may be modify order page
(P2 itself may be a wizard page composed by few child pages P21, P22, P23...)
P3 may be acceptance list page...
What we need is maintaining state between pages P1, P2, P3... but do not share the same SMPC,
(shared SMPC is still need for P21 -> P22 -> P23)
If using LRC, the whole data will be cache in a single SMPC
(in fact, we did not consider slate data yet).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107627#4107627
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107627
18 years, 6 months
[JBoss Messaging] - JBM-1.4.0.SP1 Bridge Deploy/Undeploy Issues
by LeifOO
Hello,
#JBMESSAGING-999 now works, but I run into a problem when I un-deploy a bridge service after stopping the "remote" node.
The scenario:
Start two nodes, node0 and node1.
Deploy Remote JMS-DS and Bridge Service on node0
Stop node1. The bridge service detects that node1 is unavailable.
Un-deploy Remote JMS-DS and Bridge Service. It seems that the bridge service is not completly un-deployed and tries to connect to node1 even if the service is un-deployed(stopped). This is the output from node0:
| 02:21:20,671 INFO [BridgeService] Started bridge BridgeService. Source: /queue/A Target: /queue/A
| 02:21:28,640 ERROR [SocketClientInvoker] Got marshalling exception, exiting
| java.io.IOException: Connection reset by peer: socket write error
| at java.net.SocketOutputStream.socketWrite0(Native Method)
| at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
| at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
| at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
| at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
| at java.io.DataOutputStream.flush(DataOutputStream.java:106)
| at org.jboss.jms.wireformat.SerializedPacket.write(SerializedPacket.java:81)
| at org.jboss.jms.wireformat.JMSWireFormat.write(JMSWireFormat.java:237)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:983)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:559)
| at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.ConnectionValidator.doCheckConnection(ConnectionValidator.java:133)
| at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:308)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| 02:21:28,640 WARN [Bridge] Detected failure on connection
| javax.jms.JMSException: Failure on underlying remoting connection
| at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:102)
| at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:452)
| 02:21:40,656 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed to ping to server: Can not get c
| onnection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss
| .jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowF
| actor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 02:21:40,703 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] XAResourceReco
| rd.rollback - xa error XAException.XAER_NOTA
| 02:21:40,703 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_54] - Top-level abort of action -3f57fe97:5db:474a1955:a6 received TwoPhaseOutcome.FINISH_ERROR fr
| om <ClassName:RecordType.JTA_RECORD>
| 02:21:40,703 INFO [BridgeService] Stopped bridge BridgeService
| 02:21:50,718 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed to ping to server: Can not get c
| onnection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss
| .jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowF
| actor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 02:22:00,781 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed to ping to server: Can not get c
| onnection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss
| .jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowF
| actor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 02:22:10,828 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed to ping to server: Can not get c
| onnection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss
| .jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowF
| actor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 02:22:18,875 WARN [Client] unable to remove remote callback handler: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.
| 0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWire
| Format&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFor
| mat]
| 02:22:20,890 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed to ping to server: Can not get c
| onnection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss
| .jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowF
| actor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 02:22:28,843 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed sending disconnect for client le
| ase for client with session ID 5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1o
| 02:22:30,843 WARN [LeasePinger] LeasePinger[SocketClientInvoker[1933eab, bisocket://127.0.0.1:4557](5c4o12x-l5758i-f9gafm8t-1-f9gbdsk1-1p)] failed to ping to server: Can not get c
| onnection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4557/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss
| .jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowF
| actor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 02:22:38,890 ERROR [MicroRemoteClientInvoker] error shutting down lease pinger
| 02:22:38,890 ERROR [ClosedInterceptor] ClosedInterceptor.ClientSessionDelegate[u1-clsdbg9f-1-t8mfag9f-i8575l-x21o4c5]: method getXAResource() did not go through, the interceptor is
| CLOSED
| 02:22:38,890 WARN [Bridge] Will retry after a pause of 5000 ms
| 02:22:44,828 WARN [Bridge] Failed to set up connections
| javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1199 [Root exception is javax.naming.CommunicationException: Failed to connect to s
| erver localhost:1199 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1199 [Root exception is java.net.ConnectException: Connectio
| n refused: connect]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at org.jboss.jms.server.bridge.JNDIFactorySupport.createObject(JNDIFactorySupport.java:66)
| at org.jboss.jms.server.bridge.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:45)
| at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:910)
| at org.jboss.jms.server.bridge.Bridge.setupJMSObjectsWithRetry(Bridge.java:1152)
| at org.jboss.jms.server.bridge.Bridge.access$1500(Bridge.java:66)
| at org.jboss.jms.server.bridge.Bridge$FailureHandler.run(Bridge.java:1507)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1199 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server
| localhost:1199 [Root exception is java.net.ConnectException: Connection refused: connect]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
| ... 10 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1199 [Root exception is java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
| ... 11 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:519)
| at java.net.Socket.connect(Socket.java:469)
| at java.net.Socket.<init>(Socket.java:366)
| at java.net.Socket.<init>(Socket.java:267)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
| ... 11 more
| 02:22:44,843 ERROR [ClosedInterceptor] ClosedInterceptor.ClientSessionDelegate[u1-clsdbg9f-1-t8mfag9f-i8575l-x21o4c5]: method getXAResource() did not go through, the interceptor is
| CLOSED
| 02:22:44,843 WARN [Bridge] Failed to set up connections, will retry after a pause of 5000 ms
| 02:22:50,765 WARN [Bridge] Failed to set up connections
Everything works as expected if I un-deploy while both nodes are running.
The remote ds:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <connection-factories>
|
| <!-- The Remote JMS provider loader -->
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider">
| <attribute name="ProviderName">MyRemoteJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <!-- The combined connection factory -->
| <attribute name="FactoryRef">/XAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
| <!-- Access JMS via HAJNDI -->
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=localhost:1199
| jnp.disableDiscovery=true
| </attribute>
| </mbean>
| </connection-factories>
|
The bridge service:
| <?xml version="1.0" encoding="UTF-8"?>
| <!--
| Example deployment descriptor for a message bridge
| $Id: messaging-secure-socket-service.xml 2737 2007-05-29 17:56:49Z timfox $
| -->
|
| <server>
|
| <mbean code="org.jboss.jms.server.bridge.BridgeService"
| name="jboss.messaging:service=Bridge,name=TestBridge"
| xmbean-dd="xmdesc/Bridge-xmbean.xml">
|
| <!-- The JMS provider loader that is used to lookup the source destination -->
| <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
| <!-- The JMS provider loader that is used to lookup the target destination -->
| <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider</depends>
|
| <!-- The JMS provider loader that is used to lookup the source destination
| <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=HAJNDIJMSProvider</depends>
| -->
| <!-- The JMS provider loader that is used to lookup the target destination
| <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=HAJNDIJMSProvider</depends>
| -->
|
|
| <!-- The JNDI lookup for the source destination -->
| <attribute name="SourceDestinationLookup">/queue/A</attribute>
|
| <!-- The JNDI lookup for the target destination -->
| <attribute name="TargetDestinationLookup">/queue/A</attribute>
|
| <!-- The username to use for the source connection
| <attribute name="SourceUsername">bob</attribute>
| -->
|
| <!-- The password to use for the source connection
| <attribute name="SourcePassword">cheesecake</attribute>
| -->
|
| <!-- The username to use for the target connection
| <attribute name="TargetUsername">mary</attribute>
| -->
|
| <!-- The password to use for the target connection
| <attribute name="TargetPassword">hotdog</attribute>
| -->
|
| <!-- Optional: The Quality Of Service mode to use, one of:
| QOS_AT_MOST_ONCE = 0;
| QOS_DUPLICATES_OK = 1;
| QOS_ONCE_AND_ONLY_ONCE = 2; -->
| <attribute name="QualityOfServiceMode">2</attribute>
|
| <!-- JMS selector to use for consuming messages from the source
| <attribute name="Selector">specify jms selector here</attribute>
| -->
|
| <!-- The maximum number of messages to consume from the source before sending to the target -->
| <attribute name="MaxBatchSize">5</attribute>
|
| <!-- The maximum time to wait (in ms) before sending a batch to the target even if MaxBatchSize is not exceeded.
| -1 means wait forever -->
| <attribute name="MaxBatchTime">-1</attribute>
|
| <!-- If consuming from a durable subscription this is the subscription name
| <attribute name="SubName">mysub</attribute>
| -->
|
| <!-- If consuming from a durable subscription this is the client ID to use
| <attribute name="ClientID">myClientID</attribute>
| -->
|
| <!-- The number of ms to wait between connection retrues in the event connections to source or target fail -->
| <attribute name="FailureRetryInterval">5000</attribute>
|
| <!-- The maximum number of connection retries to make in case of failure, before giving up
| -1 means try forever-->
| <attribute name="MaxRetries">-1</attribute>
|
| <!-- If true then the message id of the message before bridging will be added as a header to the message so it is available
| to the receiver. Can then be sent as correlation id to correlate in a distributed request-response -->
| <attribute name="AddMessageIDInHeader">false</attribute>
|
| </mbean>
|
| </server>
|
Regards
Leif Olsen
My environment:
WinXP
jdk1.6.0
jboss-4.2.2.GA
MySql5
jboss-messaging-1.4.0.SP1
jboss-remoting 2.2.2.SP1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107626#4107626
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107626
18 years, 6 months
[JBoss Seam] - Re: selectItems - Is it possible?
by Kragoth
I have used IGx89's converter and it is working perfectly for me....
I've made a few slight changes but nothing major... other then that I have moved the Store outside the converter.
Oh and I have done some specific stuff for my project to make it easier for me but you can get rid of all that.
So for anyone interested:
ObjectConverter.java
| package gekko.web.converter;
|
| import static org.jboss.seam.ScopeType.CONVERSATION;
| import gekko.util.StringUtils;
|
| import javax.faces.component.UIComponent;
| import javax.faces.context.FacesContext;
| import javax.faces.convert.ConverterException;
|
| import org.jboss.seam.Seam;
| import org.jboss.seam.annotations.Install;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.faces.Converter;
| import org.jboss.seam.annotations.intercept.BypassInterceptors;
|
| @Name("GenericObjectConverter")
| @Scope(CONVERSATION)
| @Install(precedence = Install.APPLICATION)
| @Converter
| @BypassInterceptors
| public class ObjectConverter implements javax.faces.convert.Converter {
|
| @Override
| public Object getAsObject(FacesContext context, UIComponent component,
| String value) throws ConverterException {
|
| if (value == null) {
| return null;
| }
| return ObjectConverterStore.instance().get(value);
| }
|
| @Override
| public String getAsString(FacesContext context, UIComponent component,
| Object value) throws ConverterException {
|
| if (value == null) {
| return null;
| }
|
| String key = ObjectConverterStore.instance().contains(value);
| if (!StringUtils.isBlank(key)) {
| return key;
| }
|
| if(context.getApplication().getStateManager().isSavingStateInClient(context)
| && Seam.isEntityClass(value.getClass())) {
| throw new ConverterException("ObjectConverter is unable to handle entity classes when client-side " +
| "state saving is enabled. Please use EntityConverter instead, or enable server-side state saving");
| }
|
| return ObjectConverterStore.instance().put(value);
|
| }
|
| }
|
and
ObjectConverterStore.java
| package gekko.web.converter;
|
| import static org.jboss.seam.ScopeType.PAGE;
| import static org.jboss.seam.annotations.Install.APPLICATION;
|
| import gekko.domain.AbstractEntityId;
| import gekko.domain.PersistentEntity;
|
| import java.rmi.server.UID;
| import java.util.HashMap;
| import java.util.Map;
|
| import org.jboss.seam.Component;
| import org.jboss.seam.annotations.Install;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.contexts.Contexts;
|
| @Name("ObjectConverterStore")
| @Install(precedence = APPLICATION)
| @Scope(PAGE)
| public class ObjectConverterStore {
|
| private final Map<String, Object> objects = new HashMap<String, Object>();
|
| // Add an object to the store
| public String put(Object entity) {
| String key;
| if (entity instanceof PersistentEntity) {
| //If this is a compound key then we need to use something else
| if (((PersistentEntity)entity).getId() instanceof AbstractEntityId) {
| key = Integer.toString(((PersistentEntity)entity).getId().hashCode());
| } else {
| key = ((PersistentEntity)entity).getId().toString();
| }
|
| } else {
| key = new UID().toString();
| }
| objects.put(key, entity);
| return key;
| }
|
| // Get an object from the store
| public Object get(String key) {
| return objects.get(key);
| }
|
| // Check if store contains the object already.
| public String contains(Object object) {
| for (Map.Entry<String, Object> entry : objects.entrySet()) {
| if (entry.getValue().equals(object)) {
| return entry.getKey();
| }
| }
| return null;
| }
|
|
| public static ObjectConverterStore instance() {
| if (!Contexts.isPageContextActive()) {
| throw new IllegalArgumentException("Page scope not active");
| }
| return (ObjectConverterStore) Component
| .getInstance(ObjectConverterStore.class);
| }
| }
|
If you have a look at ObjectConverterStore where i have
| if (entity instanceof PersistentEntity) {
| //If this is a compound key then we need to use something else
| if (((PersistentEntity)entity).getId() instanceof AbstractEntityId) {
| key = Integer.toString(((PersistentEntity)entity).getId().hashCode());
| } else {
| key = ((PersistentEntity)entity).getId().toString();
| }
|
| } else {
| key = new UID().toString();
| }
|
You could just use the line
| key = new UID().toString();
|
I've only done it that way to make some of my keys a little more meaningful... and so that I can match objects to ones that are inside my list based on id.
At least this is a working example that people can get some ideas off anyway. :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107624#4107624
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107624
18 years, 6 months
[Messaging, JMS & JBossMQ] - Unexpected pageOrd:
by jpeddler
I'm having an error at start up
java.lang.IllegalStateException: Unexpected pageOrd: 524000 expected: 524001
at org.jboss.messaging.core.plugin.JDBCPersistenceManager.getPagedReferenceInfos(JDBCPersistenceManager.java:1128)
at org.jboss.messaging.core.PagingChannelSupport.loadPagedReferences(PagingChannelSupport.java:260)
at org.jboss.messaging.core.PagingChannelSupport.checkLoad(PagingChannelSupport.java:363)
at org.jboss.messaging.core.PagingChannelSupport.load(PagingChannelSupport.java:215)
at org.jboss.jms.server.destination.QueueService.startService(QueueService.java:86)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107623#4107623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107623
18 years, 6 months
[JBoss Seam] - Accessing entities outside of injection
by utiba_davidr
Hey,
I have a web application that does not use persistence (hibernate) as we have a non-database data source and a custom mediation layer between that and Seam. I have a need to get a new (or existing) instance of a named entity (or what ever: action/controller as well) by code. The reason I am posting a request to the mailing list is because we are using the @Install annotation and as such I cannot instantiate the class directly because I of course want the "installed" version.
Something like the following would be great..
package test.product;
|
| @Name("person")
| @Install(1)
| public class Person {
|
| }
package test.site;
|
| @Name("person")
| @Install(2)
| public class Person extends test.product.Person {
|
| }
And then in code somewhere use "person" to obtain a new or existing instance of "test.site.Person" (being the installed version). Perhaps some sort of EL resolving code?
Any ideas?
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107622#4107622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107622
18 years, 6 months