[JBossWS] - Re: Urgent Help requested ...support for enums..update jboss
by sursha
create your enum class in the following format.
public class SortingTypes implements java.io.Serializable
{
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected SortingTypes(java.lang.String value)
{
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _ASC = "ASC";
public static final java.lang.String _DESC = "DESC";
public static final SortingTypes ASC = new SortingTypes(_ASC);
public static final SortingTypes DESC = new SortingTypes(_DESC);
public java.lang.String getValue() { return _value_;}
public static SortingTypes fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException
{
SortingTypes enumeration = (SortingTypes)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static SortingTypes fromString(java.lang.String value)
throws java.lang.IllegalArgumentException
{
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984265#3984265
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984265
19Â years, 6Â months
[Messaging, JMS & JBossMQ] - JMS Errors...
by kistler59
I'm developing a web appication using stateless sessionbeans, servlets and hopefully the timerservice and an mdb. I have a very simple example of this however I am getting an exception in my log which I can not determine the source of.
the mdb descriptor is as follows:
<ejb-jar>
| <enterprise-beans>
| <message-driven>
| <ejb-name>AutoSaveMDB</ejb-name>
| <ejb-class>com.autosave.mb.AutoSaveMDB</ejb-class>
| <transaction-type>Container</transaction-type>
| <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
| <message-driven-destination>
| <destination-type>javax.jms.Queue</destination-type>
| </message-driven-destination>
| <resource-ref>
| <res-ref-name>jms/DLASCF</res-ref-name>
| <res-type>javax.jms.QueueConnectionFactory</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
| </message-driven>
| </enterprise-beans>
| <assembly-descriptor>
| <container-transaction>
| <method>
| <ejb-name>AutoSaveMDB</ejb-name>
| <method-name>saveDL</method-name>
| </method>
| <trans-attribute>Required</trans-attribute>
| </container-transaction>
| </assembly-descriptor>
| </ejb-jar>
timer service descriptor:
<server>
| <mbean code="org.jboss.varia.scheduler.Scheduler"
| name="DLAutoSave.Monitor:service=Scheduler">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">com.dlens.autosave.timer.AutoSaveTask</attribute>
| <attribute name="SchedulableArguments">SampleArgument,42142</attribute>
| <attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">15000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| </mbean>
| </server>
The actual mdb and timerservice code was written by a consultant but appears to be pretty sane.. however the exceptions do not indicate (intuitively to me atleast) that it originates in our source. This is the exception we are getting - and it occurs each time the timerservice is triggered:
2006-11-08 10:52:27,482 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Listener.handleNotification(), notification: javax.management.timer.TimerNotification[source=jboss:serv
| ice=Timer][type=Schedule][message=Scheduler Notification]
| 2006-11-08 10:52:27,482 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Scheduler is started: true
| 2006-11-08 10:52:27,482 INFO [com.dlens.autosave.timer.AutoSaveTask] perform, now: Wed Nov 08 10:52:27 MST 2006, remaingRepetitions: -1, name: SampleArgument, value: 42142
| 2006-11-08 10:52:27,483 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference
| 2006-11-08 10:52:27,485 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory[server=org.jboss.mq.il.uil2.U
| ILServerIL@c77c8 connectionProperties={ClientILService=org.jboss.mq.il.uil2.UILClientILService, UIL_TCPNODELAY_KEY=yes, UIL_CHUNKSIZE_KEY=1000000, UIL_CONNECTADDRESS_KEY=null, UIL_
| CONNECTPORT_KEY=0, UIL_SOTIMEOUT_KEY=120000, UIL_RECEIVE_REPLIES_KEY=No, UIL_ADDRESS_KEY=63.172.124.26, UIL_PORT_KEY=8293, PingPeriod=60000, UIL_BUFFERSIZE_KEY=2048}]
| 2006-11-08 10:52:27,487 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
| 2006-11-08 10:52:27,487 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
| 2006-11-08 10:52:27,488 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
| 2006-11-08 10:52:27,488 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
| 2006-11-08 10:52:27,488 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
| 2006-11-08 10:52:27,488 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
| 2006-11-08 10:52:27,488 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
| 2006-11-08 10:52:27,489 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
| 2006-11-08 10:52:27,490 DEBUG [org.jboss.mq.il.uil2.UILClientILService] Starting
| 2006-11-08 10:52:27,491 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Setting up the UILClientIL Connection
| 2006-11-08 10:52:27,491 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] The UILClientIL Connection is set up
| 2006-11-08 10:52:27,492 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
| 2006-11-08 10:52:27,497 INFO [com.dlens.autosave.mb.AutoSaveMDB] onMessage, this=4652787
| 2006-11-08 10:52:27,497 INFO [com.dlens.autosave.timer.AutoSaveTask] sendSaveMessage, sent text=DLXYZ
| 2006-11-08 10:52:27,497 INFO [com.dlens.autosave.mb.AutoSaveMDB] DLXYZ processed by: 4652787
| 2006-11-08 10:52:27,497 INFO [com.dlens.autosave.mb.AutoSaveMDB] saveDL dlkey=DLXYZ
| 2006-11-08 10:52:27,499 DEBUG [org.jboss.mq.il.uil2.SocketManager] Failed to handle: org.jboss.mq.il.uil2.msgs.CloseMsg14875150[msgType: m_connectionClosing, msgID: -2147483615, er
| ror: null]
| java.io.IOException: Client is not connected
| at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:265)
| at org.jboss.mq.il.uil2.SocketManager.sendReply(SocketManager.java:239)
| at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:128)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:396)
| at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:392)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
| at java.lang.Thread.run(Thread.java:595)
| 2006-11-08 10:52:27,499 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
| java.net.SocketException: Socket closed
| at java.net.SocketInputStream.read(SocketInputStream.java:162)
| at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
| at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
| at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:79)
| at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
| at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2380)
| at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2447)
| at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2519)
| at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2668)
| at java.io.ObjectInputStream.readByte(ObjectInputStream.java:864)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:317)
| at java.lang.Thread.run(Thread.java:595)
| 2006-11-08 10:52:27,500 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
| 2006-11-08 10:52:27,500 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
| 2006-11-08 10:52:27,500 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
| 2006-11-08 10:52:27,499 DEBUG [org.jboss.mq.il.uil2.UILClientILService] Stopping
| 2006-11-08 10:52:27,499 DEBUG [org.jboss.mq.il.uil2.SocketManager] Failed to send error reply
| java.io.IOException: Client is not connected
| at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:265)
| at org.jboss.mq.il.uil2.SocketManager.access$800(SocketManager.java:52)
| at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:409)
| at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:392)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
| at java.lang.Thread.run(Thread.java:595)
| 2006-11-08 10:52:27,500 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Remaining Repititions: -1, wait for next call to stop: false
| 2006-11-08 10:52:27,499 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
I'm really kinda stumped.. any thoughts or directions I should follow?
Thanks
-Keith
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984263#3984263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984263
19Â years, 6Â months
[JBoss Seam] - Re: Integrating Seam with EJB container
by maek1975
ok thanks.
I moved my action classes (ie seam components defined in component.xml as MyEarApp/#{ejbName}/local) into the ejb-module, the component is now found/started by the jboss ejb container.
I can access the session beans like this: ctx.lookup("MyEarApp/MyEJB/local") from a jsp-file.
But when trying to load a .jsp/seam file containg seam specific code (the file is identical to seamInstallDir/examples/registration/register.jsp), the only things that are displayed is text, nighter the corresponding textfields nor the register-button.
My question is then, are there any jars that i MIGHT BE MISSING OR IS it really possible to have the component.xml and faces-config.xml residing under web-inf in my war-file. Ie. should I move these into my ejb-jar (meta-inf)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984257#3984257
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984257
19Â years, 6Â months