[JBossWS] - Re: wsdl based web-service (like a paypal simulator)?
by rocken7
Ok still confused, the docs just don't help.
Again from the top with some changes.
The ejb3 stateless bean as a webservice:
@WebService(name = "PayPalAPIAAInterface", portName = "PayPalAPIAA", serviceName = "PayPalAPIInterfaceService", targetNamespace = "urn:ebay:api:PayPalAPI", wsdlLocation="META-INF/wsdl/PayPalSvc.wsdl")
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| @WebContext(contextRoot = "/report")
| @Remote
| @Stateless
| public class PaypalSoapSimulator implements PayPalAPIAAInterface { .. }
|
Here is the PayPalAPIAAInterface:
@WebService(name = "PayPalAPIAAInterface", targetNamespace = "urn:ebay:api:PayPalAPI")
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| public interface PayPalAPIAAInterface { ... }
|
And here is a snippet from the wsdl:
<wsdl:service name="PayPalAPIInterfaceService">
| <wsdl:port name="PayPalAPI" binding="ns:PayPalAPISoapBinding">
| <wsdlsoap:address location="https://api-3t.sandbox.paypal.com/2.0/"/>
| </wsdl:port>
| <wsdl:port name="PayPalAPIAA" binding="ns:PayPalAPIAASoapBinding">
| <wsdlsoap:address location="https://api-aa-3t.sandbox.paypal.com/2.0/"/>
| </wsdl:port>
| </wsdl:service>
|
Now the PayPalSvc.wsdl imports valid official *.xsd files which are in the same folder and are straight from paypal (validated).
Jboss-4.0.5.GA no longer hangs, it just blows with a java.lang.OutOfMemoryError.
I have the heap space turned way up ( -Xmx1024m ) and it still blows?
Here is the server log, and there are tons of the xmlschema import lines before the crash.
2007-10-03 19:06:18,335 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/CoreComponentTypes.xsd
| 2007-10-03 19:06:18,350 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/eBLBaseComponents.xsd
| 2007-10-03 19:06:21,444 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/CoreComponentTypes.xsd
| 2007-10-03 19:06:21,460 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/eBLBaseComponents.xsd
| 2007-10-03 19:06:21,506 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/CoreComponentTypes.xsd
| 2007-10-03 19:06:21,538 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/eBLBaseComponents.xsd
| 2007-10-03 19:06:21,585 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/CoreComponentTypes.xsd
| 20 07-10-03 19:06:21,600 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] XMLSchema import published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/txs.ear/txs.jar/eBLBaseComponents.xsd
| 2007-10-03 19:07:17,102 ERROR [STDERR] Exception in thread "main-FastReceiver"
| 2007-10-03 19:07:17,102 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
|
Any ideas what is going on?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091213#4091213
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091213
18Â years, 6Â months
[Clustering/JBoss] - Re: HA JNDI with no bind address
by fuzzybinary
So, upon further investigation, I have found that this is indeed not possible without code changes. The offending code that makes it impossible:
>From system/src/main/org/jboss/Main.java:454
| if (rmiHost == null)
| {
| rmiHost = ServerConfigUtil.fixRemoteAddress(arg);
| Enumeration ifaces = NetworkInterface.getNetworkInterfaces();
| System.setProperty("java.rmi.server.hostname", rmiHost);
| }
|
>From system/src/main/org/jboss/system/server/ServerConfigUtil.java
| public static String fixRemoteAddress(String address)
| {
| try
| {
| if (address == null || ANY.equals(address))
| return InetAddress.getLocalHost().getHostName();
| }
| catch (UnknownHostException ignored)
| {
| }
| return address;
| }
|
Which makes it impossible to bind to all addresses *and* have an IP resolve for RMI.
I have a local fix, which checks to see if the name supplied can be resolved to anything other than localhost and, if not, grabs the first (non-loopback) IP address it can find through enumerating the network interfaces. This would not work on a multi-homed machine, but a -b with the actual IP address would probably be fine there.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091212#4091212
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091212
18Â years, 6Â months
[JNDI/Naming/Network] - HAJMS is broken under 4.2.X - no node will act as the Master
by ratrask
I am pretty confident that this is a bug, but it is possible that I have missed something. In brief, the the problem is that no node will act as the MasterNode if there is more than 1 node in the cluster.
Here's what I have run into: After configuring the nodes to be identical as per the documentation, the first node to come up will deploy the queues defined in the deploy-hasingleton/jms directory, but as soon as the second node of the cluster comes up the original node receives a stop from the BarrierController, and un-deploys the queues. The second node does not start up the queues neither do subsequent nodes in the cluster. When you stop all of the nodes in the cluster except 1, that node (it doesn't matter which) will bring back the queues.
The exact same configuration under 4.0.5 works as expected.
This behavior is easy to replicate, just install 2 virgin copies of Jboss on separate nodes. Then bring up the first node with the all configuration (run.bat ?c all). Note that is elected the Master
2007-09-24 06:48:09,718 DEBUG [org.jboss.ha.singleton.HASingletonController] partitionTopologyChanged, isElectedNewMaster=true, isMasterNode=false, viewID=-35945124
2007-09-24 06:48:09,718 DEBUG [org.jboss.ha.singleton.HASingletonController] startNewMaster, isMasterNode=false
2007-09-24 06:48:09,718 DEBUG [org.jboss.ha.singleton.HASingletonController] startSingleton() : elected for master singleton node
2007-09-24 06:48:09,718 DEBUG [org.jboss.ha.singleton.HASingletonController] Calling operation: deploy(file:/C:/JBoss/jboss-4.2.1.GA/server/all//deploy-hasingleton), on target: 'jboss.system:service=MainDeployer'
? it then created the queues for example
2007-09-24 06:48:10,484 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.mq.destination:service=Queue,name=A with code: org.jboss.mq.server.jmx.Queue
2007-09-24 06:48:10,499 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.mq.destination:service=Queue,name=A
2007-09-24 06:48:10,499 DEBUG [org.jboss.system.ServiceController] recording that jboss.mq.destination:service=Queue,name=A depends on jboss.mq:service=DestinationManager
2007-09-24 06:48:10,499 DEBUG [org.jboss.system.ServiceConfigurator] considering DestinationManager with object name jboss.mq:service=DestinationManager
? now bring up the second node. The log on the original node records the following:
2007-09-24 07:37:55,512 INFO [org.jboss.ha.framework.interfaces.HAPartition.lifecycle.DefaultPartition] New cluster view for partition DefaultPartition (id: 1, delta: 1) : [127.0.0.1:1099, 127.0.0.1:1099]
2007-09-24 07:37:55,527 DEBUG [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] membership changed from 1 to 2
? followed by
2007-09-24 07:37:56,840 DEBUG [org.jboss.system.BarrierController] Saw 'stop' handback, stopping barrier
2007-09-24 07:37:56,840 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.ha:service=HASingletonDeployer,type=Barrier
2007-09-24 07:37:56,840 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.ha:service=HASingletonDeployer,type=Barrier dependent services are: []
? and by
2007-09-24 07:37:56,855 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.mq.destination:service=Queue,name=A
2007-09-24 07:37:56,855 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.mq.destination:service=Queue,name=A dependent services are: []
2007-09-24 07:37:56,855 DEBUG [org.jboss.mq.server.jmx.Queue.A] Stopping jboss.mq.destination:service=Queue,name=A
2007-09-24 07:37:56,855 INFO [org.jboss.mq.server.jmx.Queue.A] Unbinding JNDI name: queue/A
2007-09-24 07:37:56,871 DEBUG [org.jboss.mq.server.JMSDestinationManager] Closing destination QUEUE.A
2007-09-24 07:37:56,871 DEBUG [org.jboss.mq.server.jmx.Queue.A] Stopped jboss.mq.destination:service=Queue,name=A
--------------------------------------------------------------------------------
I thought that the problem could be related to the org.jboss.ha.singleton.HASingletonElectionPolicy feature which was back ported from 5.0,
see: http://jira.jboss.com/jira/browse/JBAS-3636
This attribute shows up under the MBean attributes of org.jboss.ha.singleton.HASingletonController from the JMX console, but despite showing the attribute as read / write, you can not change the value. Attempts to set the the value in the deploy/deploy-hasingleton-service.xml file result in a property editor exception.
There is some method that I am not aware of that they have used to test this functionality out in JBoss' test suit, (for example http://www.ohloh.net/projects/480/contributors/26897/commits/6569686)
but I could not figure out how to try it out.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091211#4091211
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091211
18Â years, 6Â months
[EJB 3.0] - Reverse engineer stored proc to JPA entity beans?
by asookazian
Is it possible to do this and generate a ResultSet? Or is it recommended to just use the existing proc with JSF/Seam/EJB3? thx.
SET NOCOUNT ON
| declare @networkID varchar(50)
| declare @seedHireLevel int
| DECLARE @rptPARAM varchar(20)
|
| set @networkID = 'corp\btkach'--@paraNetworkId
| set @networkID = right(@networkID,(LEN(@networkID )-5) )
|
| SELECT
| UserId
| ,ISNULL(LEN(EmployeeID),0) AS [len_EmpId]
| ,EmployeeID
| ,FirstName + ' ' + LastName as FullName
| ,Title
| ,NetworkID
| ,BillingLogin
| ,(SELECT [A2VNAF]
| FROM [coxDSS].[dbo].[ORG_CBURIDPF]
| WHERE
| [A2USER] = BillingLogin) as SecurityGroup
| ,(SELECT
| ABS([AUNUM2]) AS AdjAmount
| FROM
| [coxDSS].[dbo].[ORG_AUTUSRPF]
| WHERE
| [AUUSER] = (SELECT [A2VNAF]
| FROM [coxDSS].[dbo].[ORG_CBURIDPF]
| WHERE
| [A2USER] = BillingLogin)
| AND
| [AUOPTN] = 'AA'
| AND
| [AUENTR] = 'Y'
| AND
| ABS([AUNUM1]) > 0) AS adjAmount
|
| ,(SELECT
| [AUFUNC] AS AdjFunc
| FROM
| [coxDSS].[dbo].[ORG_AUTUSRPF]
| WHERE
| [AUUSER] = (SELECT [A2VNAF]
| FROM [coxDSS].[dbo].[ORG_CBURIDPF]
| WHERE
| [A2USER] = BillingLogin)
| AND
| [AUOPTN] = 'AA'
| AND
| [AUENTR] = 'Y'
| AND
| ABS([AUNUM1]) > 0) AS AdjFunc
| from coxIM.dbo.u_tbUser tbU
| WHERE
| HierarchyPath LIKE '%' + @networkID + '\'
| ORDER BY
| LastName
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091209#4091209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091209
18Â years, 6Â months