Skip to main content

why to use http servlet RA?

8 replies [Last post]
andmus82
Offline
Joined: 2009-06-01

Why to use http servlet RA when i can use the javax.servlet.http package??

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mailtoseelan
Offline
Joined: 2007-03-11

HI,

I Installed the MVN in my windows XP system..

I executed this after the installation of MVN, command promt shows like this

Can you please reply me what error is this?

D:\mobicent\examples\http-servlet>\mobicent\apache-ant-1.7.1\bin\ant deploy-all
Buildfile: build.xml

init:

deploy-all:
[exec] [INFO] Scanning for projects...
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] Building Maven Default Project
[exec] [INFO] task-segment: [install]
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/
maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom
[exec] [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-res
ources-plugin:pom:2.3' from repository central (http://repo1.maven.org/maven2):
Connection timed out: connect
[exec] Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/
maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom
[exec] [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-res
ources-plugin:pom:2.3' from repository central (http://repo1.maven.org/maven2):
Connection timed out: connect
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [ERROR] BUILD ERROR
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] Failed to resolve artifact.
[exec]
[exec] GroupId: org.apache.maven.plugins
[exec] ArtifactId: maven-resources-plugin
[exec] Version: 2.3
[exec]
[exec] Reason: Unable to download the artifact from any repository
[exec]
[exec] org.apache.maven.plugins:maven-resources-plugin:pom:2.3
[exec]
[exec] from the specified remote repositories:
[exec] central (http://repo1.maven.org/maven2)
[exec]
[exec]
[exec]
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] For more information, run Maven with the -e switch
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] Total time: 2 minutes 50 seconds
[exec] [INFO] Finished at: Fri Jul 10 16:57:13 IST 2009
[exec] [INFO] Final Memory: 1M/2M
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] Result: 1
[exec] [INFO] Scanning for projects...
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [ERROR] FATAL ERROR
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] Failed to resolve artifact.
[exec]
[exec] GroupId: org.mobicents
[exec] ArtifactId: mobicents-jainslee-server
[exec] Version: 1.2.7.GA-SNAPSHOT
[exec]
[exec] Reason: Unable to download the artifact from any repository
[exec]
[exec] org.mobicents:mobicents-jainslee-server:pom:1.2.7.GA-SNAPSHOT
[exec]
[exec] from the specified remote repositories:
[exec] central (http://repo1.maven.org/maven2)
[exec]
[exec]
[exec]
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] Trace
[exec] org.apache.maven.reactor.MavenExecutionException: Cannot find parent
: org.mobicents:mobicents-jainslee-server for project: org.mobicents.examples:ht
tp-servlet-parent:pom:null for project org.mobicents.examples:http-servlet-paren
t:pom:null
[exec] at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:4
32)
[exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:300
)
[exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
[exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
[exec] at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMai
n.java:41)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:585)
[exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.jav
a:315)
[exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.j
ava:430)
[exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[exec] Caused by: org.apache.maven.project.ProjectBuildingException: Cannot
find parent: org.mobicents:mobicents-jainslee-server for project: org.mobicents
.examples:http-servlet-parent:pom:null for project org.mobicents.examples:http-s
ervlet-parent:pom:null
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.assembleL
ineage(DefaultMavenProjectBuilder.java:1396)
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.buildInte
rnal(DefaultMavenProjectBuilder.java:823)
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.buildFrom
SourceFileInternal(DefaultMavenProjectBuilder.java:508)
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.build(Def
aultMavenProjectBuilder.java:200)
[exec] at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:63
2)
[exec] at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.ja
va:515)
[exec] at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:4
19)
[exec] ... 12 more
[exec] Caused by: org.apache.maven.project.ProjectBuildingException: POM 'o
rg.mobicents:mobicents-jainslee-server' not found in repository: Unable to downl
oad the artifact from any repository
[exec]
[exec] org.mobicents:mobicents-jainslee-server:pom:1.2.7.GA-SNAPSHOT
[exec]
[exec] from the specified remote repositories:
[exec] central (http://repo1.maven.org/maven2)
[exec]
[exec] for project org.mobicents:mobicents-jainslee-server
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.findModel
FromRepository(DefaultMavenProjectBuilder.java:605)
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.assembleL
ineage(DefaultMavenProjectBuilder.java:1392)
[exec] ... 18 more
[exec] Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundExcept
ion: Unable to download the artifact from any repository
[exec]
[exec] org.mobicents:mobicents-jainslee-server:pom:1.2.7.GA-SNAPSHOT
[exec]
[exec] from the specified remote repositories:
[exec] central (http://repo1.maven.org/maven2)
[exec]
[exec]
[exec] at org.apache.maven.artifact.resolver.DefaultArtifactResolver.re
solve(DefaultArtifactResolver.java:228)
[exec] at org.apache.maven.artifact.resolver.DefaultArtifactResolver.re
solve(DefaultArtifactResolver.java:90)
[exec] at org.apache.maven.project.DefaultMavenProjectBuilder.findModel
FromRepository(DefaultMavenProjectBuilder.java:558)
[exec] ... 19 more
[exec] Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Una
ble to download the artifact from any repository
[exec] at org.apache.maven.artifact.manager.DefaultWagonManager.getArti
fact(DefaultWagonManager.java:349)
[exec] at org.apache.maven.artifact.resolver.DefaultArtifactResolver.re
solve(DefaultArtifactResolver.java:216)
[exec] ... 21 more
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] [INFO] Total time: < 1 second
[exec] [INFO] Finished at: Fri Jul 10 16:57:16 IST 2009
[exec] [INFO] Final Memory: 1M/2M
[exec] [INFO] -------------------------------------------------------------
-----------
[exec] Result: 1

BUILD SUCCESSFUL
Total time: 2 minutes 55 seconds

Waiting for your reply

Thanks & Regards
Jayaseelan.

alexandrem
Offline
Joined: 2005-10-19

Hi,

Why would you need SLEE then, you can always use xxx.yyy.zzz package :)

The idea is to reuse what's done and only matter with real business logic.

By using the RAs all you have to care is about your own logic and not in managing the HTTP connections/sessions. And in case you want to add/change the protocol, it's much simple to apply that change.

Also, it's against SLEE contract for SBBs to access external resources directly, they should go via Resource Adaptors, in order to ensure the SLEE high-throughput and low-latency.

Regards,
Alexandre Mendonça

eduardomartins
Offline
Joined: 2005-10-10

The http servlet RA adapts the http servlet to JAIN SLEE, that is, converts http requests on a servlet into JAIN SLEE events.

mailtoseelan
Offline
Joined: 2007-03-11

HI,

I installed HTTPSERVLETRA successfully on Mobicent.

Now am trying to deploy the HTTPServletExample which idownloaded from cvs..

But i couldn't deploy successfully in linux and also in windows..

Can you please guide me how to deploy that example and how to test the example?

Regards
Jayaseelan

alexandrem
Offline
Joined: 2005-10-19

The CVS version is not supported anymore, please use the one present in our SVN repository:

http://mobicents.googlecode.com/svn/branches/servers/jain-slee/1.x.y/exa...

If you need guidance on Maven:

http://groups.google.com/group/mobicents-public/web/quick-start-guide-wi...

Regards,
Alexandre Mendonca
JBoss R&D

mailtoseelan
Offline
Joined: 2007-03-11

Hi,

Thanks for your valuable reply.

I tried that examples given in that link..http-servlet example..

I used the ant to build..

The error is,

D:\mobicent\examples\http-servlet>\mobicent\apache-ant-1.7.1\bin\ant -f build.xm
l deploy-all
Buildfile: build.xml

init:

deploy-all:

BUILD FAILED
D:\mobicent\examples\http-servlet\build.xml:15: Execute failed: java.io.IOExcept
ion: CreateProcess: mvn.bat install error=2

Total time: 1 second

Can you please reply me do i want to use MVN or ANT is enough for deploy the example?

Waiting for your reply...

alexandrem
Offline
Joined: 2005-10-19

You must use maven, we just keep ant build.xml as an interface to calling maven targets.

Install maven and the just run in the example folder: [b]mvn install[/b]

Regards,
Alexandre Mendonca
JBoss R&D

mailtoseelan
Offline
Joined: 2007-03-11

HI,

Whn i execute this command, i got this error...I dont know how to fix it.. Can u please help me on this?

D:\mobicent\examples\http-client>mvn -e install
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.mobicents
ArtifactId: mobicents-jainslee-server
Version: 1.2.7.GA-SNAPSHOT

Reason: Unable to download the artifact from any repository

org.mobicents:mobicents-jainslee-server:pom:1.2.7.GA-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.mobice
nts:mobicents-jainslee-server for project: org.mobicents.examples:http-client-pa
rent:pom:null for project org.mobicents.examples:http-client-parent:pom:null
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:432)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:300)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent
: org.mobicents:mobicents-jainslee-server for project: org.mobicents.examples:ht
tp-client-parent:pom:null for project org.mobicents.examples:http-client-parent:
pom:null
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1396)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:823)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:508)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:632)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:515)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:419)
... 12 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.mobicents
:mobicents-jainslee-server' not found in repository: Unable to download the arti
fact from any repository
org.mobicents:mobicents-jainslee-server:pom:1.2.7.GA-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.mobicents:mobicents-jainslee-server
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:605)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1392)
... 18 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable
to download the artifact from any repository
org.mobicents:mobicents-jainslee-server:pom:1.2.7.GA-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:228)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:90)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:558)
... 19 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
aultWagonManager.java:349)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:216)
... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Jul 13 11:12:13 IST 2009
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------